The person who owns the property is the one with his name on the Registered Title.
That is the legal owner.
However, a third party can claim a beneficial interest or equitable interest in the property in certain ways - one of which is to prove he has paid a large amount of money off the mortgage IN THE BELIEF he would be entitled to a share of the equity. If he can prove this by wirtten documents, so much the better.
There are many examples but it is a complex and detailed area of law.