There are 5 points relative to an orbiting body in a mostly circular orbit which are gravitationally stable, meaning that a small body placed in such a location would remain there. These are called Lagrangian points. There are 3 such points along the axis between the planet and star called L1 (between), L2 (behind the smaller body), and L3 (opposite the smaller body). However, these 3 points are not truly stable, an object that is only a tiny distance from the exact Lagrangian point will tend to get farther and farther from it over time, until eventually it's just in solar orbit. Spacecraft can still take advantage of these points though since they can make minute adjustments over time.
The other 2 points, L4 and L5, are 60 degrees ahead and behind of the planet (at the corners of equilateral triangles with the star and planet at the other corners). These points are dynamically stable, objects that drift a little away from the points will still be kept near them. For this reason the L4 and L5 points around very large planets are capable of capturing asteroids and retaining them as effective "moons".
There are many thousands of asteroids orbiting the L4 and L5 points of Jupiter, traditionally these have been named after literary heroes of the Trojan war, thus they are often called Trojan asteroids or Trojan moons. The same name is sometimes applied to the L4/L5 points in general or to asteroids in such points relative to other planets.