Ants inject formic acid when they bite, which causes irritation and pain.