"Immunity" means that a specified individual or party is protected against lawsuits. The party in question is immune from being sued due to laws and regulations in place, which will vary depending on the party in question and the type of lawsuit. Immunity comes in a variety of forms and is regulated by several different state and federal laws. In general, immunity against lawsuits is divided into two main categories: "absolute immunity" and "qualified immunity."
A person or group with absolute immunity against lawsuits cannot be sued for any act performed in their official capacity, their immunity is unconditional. The party's intentions are not taken into account here, provided they are acting in their protected official role, they cannot be sued even if it's believed that they acted in a way that is unfair or illegal (they can, of course, be removed from office, but lawsuits are still not allowed). Typically absolute immunity covers judges, lawyers, and other legal officials while acting in their legal capacities. It is essential that these individuals have absolute immunity so they can do their jobs properly--if a lawyer feared being sued for false imprisonment, for example, he might be unwilling or unable to prosecute a potential criminal for a crime because of this threat.
Less all-encompassing than absolute immunity, qualified immunity offers a certain amount of protection. However, those with qualified immunity can be sued if it can be proven that their actions violate established, accepted rights known reasonably to be a part of their role. Police officers are an excellent example of those with qualified immunity. They cannot generally be sued, unless their actions rise to a level of wanton or willfulness. In these cases, intent is considered when determining whether a lawsuit against an individual with qualified immunity is subject to suit for a given action.
If you have questions regarding a specific case of immunity, consult an attorney.