Borrowed from Latin prīmārius (“one of the first”). Doublet of primeiro and premiê.
Practice speaking and memorizing "primário" and many other words and sentences in Portuguese.