Where should I look in the "ArduCopter" source code?
And I wonder how it works in detail.
I'm sure sure how it's coded or where to look in the source code. But in order to use the "Follow Me" function you will need an Android device running the Tower App, or a Windows Tablet/PC with a GPS module connected.
You will also a set of the 3DR Telemetry Radios to communicate between the ground station and the drone. You can then activate the Follow-Me function from the Ground Station and the drone will track the GPS position of the ground station.
I've used this successfully with a very cheap Android phone running the Tower App and the 3DR radio connected via a USB OTG cable.