Track connections

How does KiCad know which symbol pin represents which pad of the footprint? may be good to read.