Trapping is a common tactic. In fact it is used once each game you play! The whole point of trapping is to trap your opponent's piece, including their king. Here is an example of a bishop trapping:
Kings can also be trapped! Here is an example:
I hoped you learned something and don't get your pieces trapped! Enjoy!