The concept of immunity within legal contexts involves various protections afforded to public officials, shielding them from lawsuits under specific conditions. Sovereign immunity generally protects government entities from being sued without their consent.