Taking a human shield in Grand Theft Auto 5

During certain scenarios, enemies or allies will take a human shield in a mission, trying to protect themselves by shielding themselves with an ally.

In these situations, it is beneficial to switch characters to shoot the enemy taking your ally hostage.