A king is the highest or first magistrate, as is the President of the United States of America.
The word is more particularly applied to subordinate officers, as governors, intendants, prefects, mayors, justice of the peace, and the like.