The user is able to develop immunity to detrimental factors (elements, effects, powers, objects, etc.) through exposure to such things. The time frame can vary from repeated long-term exposure to just being exposed once before developing the immunity.
Due to his prolonged exposure to it, Scarecrow (Batman: Arkham Knight) has built up a partial immunity to his own fear toxin.
Repeated exposure to sonic vibrations has allowed the Venom symbiote (Marvel Comics) to build up an immunity to them.
Draconis (Marvel Comics) has developed immunity to all traditional vampire weaknesses like holy symbols and sunlight with small gradual exposures to it.
After all the times he's been a victim of mind control and telepathy, Peter Parker/Spider-Man (Marvel Comics) has developed a partial immunity in the form of multiple copies of himself, which viciously attack anyone who invades his mind.
Pickles (Metalocalypse) has developed an immunity to virtually all drugs as a result of smoking "government weed" daily since the age of six.
Monkey D. Luffy (One Piece) developed an immunity to most toxins and deadly poisons after being exposed to Magellan's poison and nearly dying.
Alex Mercer (Prototype) was able to build up an immunity to Bloodtox, an anti-Blacklight toxin, with repeated exposure.
Katherine Pierce (The Vampire Diaries) has built up an immunity to vervain by repeatedly drinking fluids laced with the herb.