Both eldest and oldest refer to the greatest in age. The crucial difference, however, lies in the fact that eldest can only be used for related persons, while oldest can be used for any person, place or thing in a group of related or unrelated elements. Examples:

He is the eldest/oldest of the three children.

Mine is the eldest/oldest car on the block.

John is the eldest/oldest student in my class.

She is the eldest (less common)/oldest of my nieces.

‘Is New York the eldest/oldest city in the US?’

And while eldest can be used for any group of related persons (as in the above example with the nieces) in reality, it is mostly only used in reference to siblings.