The centurion exercised command of the century, a unit comparable to the company in the current armies.
Its name can deceive us, since, although referring to the hundred, the troops of a Roman century were limited to 80 legionaries divided into 10 contubernios of 8 soldiers each who shared the tent or the barracks.
The centurions came from the troop and to reach that rank they had probably passed through different intermediate degrees such as the tesserarius that was in charge of guarding the passwords that it received written in a tesera or tablet and later having exercised the optio rank until having proved his worth and a centurion's place vacated, generally in the last century of the last cohort of the legion, he could be incorporated as an officer.
From then on his career could go on over the years, rising in the number of the century until, if he had luck and aptitude, he became the primus pillus of the first century of the first cohort.
That is, the most professional officer of the legion.