They mean the same thing - it's a somewhat outdated form of indication of possession (as you probably know a lot of surnames mean something along the lines of "a child of ...", "an inhabitant/a governor of ...", etc.).
Why are these endings different? It's just a matter of grammar (like declensions and such).

This way to indicate possession is still used:
e.g. кошкин дом - cat's house (a house of a cat), and Кошкин as a last name is also legitimate.