What does Immunity mean?
Legal immunity means a person will not be held legally responsible for crimes they have committed. There are different types of immunity including diplomatic immunity, parliamentary immunity, judicial immunity, and sovereign immunity.
Alleged criminals may also be immune from prosecution if they provide information to the state which may allow the state to charge another person for a greater crime. In this case they may agree to provide self-incriminating testimony, but the information will not be used against them.
Immunity from prosecution is common for drug dealers and other organized criminal activities where the government is more concerned about prosecuting high level criminal organizers rather than a low level drug dealer. In this case the witness agrees to testify against someone else as part of their plea agreement. Keep in mind if you have been offered immunity from prosecution this agreement does not protect you from prosecution for future crimes.