I remember a news which says A foreigner caught with a satellite phone on the airport which is restricted in India.
after questioning, the officials found that he was not aware of the restriction and bring it unknowingly. So, they seized the product and let him go without charging any cases against him.
Now your question
The priority they give vary from thing to thing.
That is they didn't treat Gold or Cash in the way in which they treat the Satellite phone or bomb. Also it vary when it comes to drugs and such things.
They scan the luggage in the absence of the person and if they have any doubt or found anything, they will call the person and ask him to open the box in front of them.
If they were right, that is anything found as they assumed, they will take the person to the customs office and question you.
The way they question you and the person who question you also depends.
If they found any drug which is prohibited in India, they question you politely because they are not sure whether you are aware of this or not.
If they found you are unaware of it, then further move will depends on the product.
If it is a drug and can't be treated as a medicine in anyway, they will charge a case against you.
If it is some kind of medicine but prohibited in India ( but allowed in the country where you came from), they won't charge any case.
If it was something like bomb or etc., then they may handover you to police along with the product after questioning and further actions will be done as per rules.
If it is some kind of equipment which is banned in India but allowed in the country in which you came from, they may not charge any cases against you ( eg : the satellite phone I mentioned above).