An artwork has to fulfil two conditions to be a portrait. The first is that it depicts a person. The second is more complicated.
The picture should tell us something significant about the person, some aspect of their social status, personality, temperament or character. This should also be the realisation of the artist’s intention. We might not know much about that intention, especially when the artist is long gone, but this intention is usually readable in the pictorial and aesthetic strategy of the work.
Representations of people in the ancient world tended to be idealised figures from mythology or religious tradition so did not represent any particular person who ever actually lived. The earliest exceptions to this were probably the Egyptian portraits of pharaohs and later the Roman portraits of their emperors. For many centuries, portraits were only ever made of people with a significant place in society or the wealth to afford the commission, but since the time of Rembrandt, portraits have also been made of ordinary people that appeal to the artist in some way.
Since then, the portrait (and self-portrait) has been the vehicle for an extraordinary diversity of artistic experimentation, especially since the early 20th century.
This is a good general discussion, available from the library:
Brilliant, R (1991) Introduction, Portraiture, London: Reaktion Books, pp. 7-21