I can't say for sure how "they" do it, but there are a number of options available. Radio in general is very leaky - even rather low power and directional beams can be detected off axis if they travel enough distance and you have sensitive enough equipment. In general you just need a few antennas (or even one, if your're a masochist) and an ability to point them at things. Check for when the signal is the strongest, and check for timing between the receivers and you can get a very good idea of where the transmission comes from. In practice you could do this with multiple antennas (an array) on a single satellite, multiple other satellites or spacecraft, or simply an aircraft or trucks if you control the ground space. I'm willing to bet it's usually done on the targeted bird itself, they aren't completely cut off from communication, have multiple antennas and can even adjust their attitude if it was necessary.
This is broadly how the SETI program works for example.
This is broadly how the SETI program works for example.