It's kinda disturbing when people keep calling me during work or meetings, but to me it's okay if I receive short messages or Whatsapp message because I can reply them few minutes later in a short break. I'm new Android user and wonder if my phone could do that for me.
You can use the tried and tested
Call Barring method
Go to Settings
There, all incoming calls will be blocked. You may still be able to place calls unless you barred that too.
This feature is carrier network dependent and it already exists in the dumbphone era. Still useful though.
I also found Call Guard in the Play Store. Maybe you take a look at it.
(At least in some phones, for example LG G3) there's an option for this:
Call / (select
Common if this is dual SIM device) /
Call reject. You can select
Reject all calls in
Call reject mode to reject all calls automatically.
Go to call forwarding menu and forward all calls to voicemail