It is called a tonsure and was used to mark a man in the clerical state–in other words a man who had taken religious vows.
This practice finds its origin in the Old Testament (Nm 6:18) and is very much alive in the New. Paul had his head shaved when he made a vow (Acts 18:18); others did likewise (Acts 21:23-24).
The practice continued throughout the early Church and became formalized as part of the externals marking a man as an ecclesiastic. The tonsure was generally part of the ceremony for admitting a novice or a seminarian. In 1972 the “minor orders” were combined with the order of deacon, and the tonsure was no longer required.