The words who , which , and what are relative pronouns when they are used to introduce a relative clause. The simple sentence consists of the main clause, The man has a goat. But there is a relative clause specifying which man. That's the part that is highlighted. The relative pronoun who has an antecedent.
Man is the antecedent of who .
The masculine follows the 2nd declension without exception. Even the nominative singular retains the j that is lost in the definite article. The feminine follows the 1st declension without exception. Only in the neuter do we encounter what might be considered an anomaly, and that is the missing n in the nom. Also notice that there are rough breathings throughout.