How do aircraft follow the tarmac lines while taxiing?
For most aircraft:
It is just something that you learn. As you approach a line, you have a general sense of where the line is, because you can see the line continue in front of you. This also applies to turning, where you are familiar with the turn radius, and have a sense of where it is. It is similar to a car, in that you can drive down the center line of the road, and still know it is underneath. Scale is just increased.

For tail-draggers:
A tail-dragger is an aircraft that has two front wheels, and one rear wheel, meaning the aircraft is typically pitched up when on the ground. In this situation, the pilot zigzags across the taxiway, looking roughly 30 degrees front left or front right, checking the area in front of him. This isn't so much for following the line though, as it is for ensuring you're not about to hit anything in front of you.



Please let me know if there are any clarifications I can add!