Trojans are asteroids that orbit a massive object (the Sun), but have been attracted to the Lagrange points of a less massive object (the Earth). I think it's L4 in this case, but don't quote me on that. Essentially, what's happening is that if the asteroid "fell behind" in its orbit, the Earth's gravity would tend to speed it up, and if it "got ahead" the Sun's gravity would tend to slow it down.
Edit: After looking at the animation, it appears that's it's actually orbiting our L5.