If prayer starts and a person is still on his way to the masjid, then he should not hurry in his walk; instead, he should walk with calmness and respect as indicated in the hadith of Abi Huraira (may Allah be pleased with him), in which he said: [The Prophet] (peace be upon him) said: "If salaat is started, do not approach it running, but approach it walking, with calmness. Whatever you catch up with, pray, and what you miss, complete it."1
From the book What Should You Do in the Following Situations... ?
1 Narrated by Al-Bukhari Fath 2/390.