How does an airliner adjust and move exactly over the coloured lines before stopping in front of the jetways?
There are a few different ways. Probably the most low-tech and widespread is by marshaller guidance, which is a person outside the aircraft guiding the pilots by means of visual signals:

The exact hand signals to use are defined by the ICAO, meaning that they are identical no matter where in the world you are flying.
Most larger airport have some sort of &quot;docking system&quot; at some or all of their stands. There are different types, but they are all external systems that provide visual guidance for the pilots, just like a marshaller. The simplets form is a big mirror next to the parking position:

More common are electronic docking systems, which use various sensors to detect the exact position of the aircraft and calculate any corrections needed by the pilots. They are placed directly in front of the position where the aircraft must stop, typically mounted on the terminal building or a high mast: