First, we need to establish a little onomastic precision. In the Middle Ages, "surname" usually refers to what is also called an eke-name, a name that differentiated all the Williams in town, or village.
Everyone having the same eke-name would defeat this pupose. Eke-names could be based on who your father or mother was, where you lived, what you did for a living, or what you looked like. By "where you lived," we mean something like Atte-water or Oak-meadow. You generally only got known by a place's name after you went somewhere else. So you're only called Giulio of Pisa after you move to Rome.
If what you meant to ask after was inherited family names, yes, laymen call them surnames because in English and French they come last, but that's a problem in other cultural groups, even in Europe.
In feudal times, as we may guess, oh, 400 to 1350, relatively few noble families, mostly in the Italian states, even used family names. So, no, the peasants had nothing to borrow in most of Europe. Trying to pass as a member of your Lord's family is illegal, rather than being ordinary. Think of how starchy they get about "the honour of their name." They're not sharing it with villeins!
How likely would a person with a surname tied to a castle or land actually be related to the name?
I think you mean to ask if a person with a family name based on a place were likely to be of the family that once held it. Odds are, no. Most titles have been through several families, between heirresses marrying and empty titles being awarded again. But only a genealogy can tell.