Most modern governments keep records to make sure people are who they say they are, but they can only do this because of modern technology.
So, in the medieval world of Europe, what would stop, say a commoner, from claiming they were a visiting noble of another family and being treated as a guest of another noble?
Did nobles carry around pedigree papers or official insignias of their family's heraldry? If they did, what kept these from being forged?
I think you would be more likely to have a noble getting away with being a different noble than a commoner/peasant getting away with it.
For a start there's the physical appearance. Depending on their occupation a commoner might have similar muscle strength to a noble (nobles were trained in jousting and fighting in armor so they were physically very strong), but if their early years featured famine and general deprivation then would physically be smaller than a noble. Most of the people that are believe to be unusually tall for the time (King Edward I of England was reported to be 6 feet tall and got the name "Longshanks" as a result) were from the upper classes, probably because we now know that a proper diet is essential to bone and muscle development in children and has implications for their adult years. Nobles also learned proper horsemanship from an early age and could ride for hours without a rest, commoners could not afford such an animal let alone learn how to ride one.
Nobles were also expected to dress up. Their clothes were a signal of their family wealth, with velvets, thick wool, fur lining, all dyed beautifully in rich colours and with patterns and symbols that were often connected to heraldry. They also wore jewellery with rich gemstones, such as rings, gold collars (which were more like a large draped necklace than a dog collar), and with more gems embroidered in to their clothing. Even stealing one robe would have been difficult, let alone stealing enough to create a wardrobe suitable for a noble.
Then there was language. Courtly language was very different from the basic tongue of a commoner. Latin was often the common language between neighbouring countries, and then nobles and Royals were expected to be fluent in at least one other language. Even if they spoke their "native" language it would not have sounded the same as a commoner. They would also know how to read and, to a certain extent, write. Their knowledge would be far beyond that of an ordinary man, even one from a town. They would have travelled further, had a greater experience of the world, and that would shine through in their behaviour and conversation. Richard I (the Lionheart) tried to hide as a kitchen servant when travelling back through Austria and was spotted relatively quickly as he just didn't fit in.
Also even though travel was difficult, it was possible for nobles from families in different countries to know each other. When Richard of Cornwall, the younger brother of King Henry III of England, was on Crusade to the Holy Land he managed to arrange for the ransom payments for a number of Frenchmen who had been captured after the last French crusade and were left to rot in prison. Several years later Richard was in France facing the French army, a number of the men recognised Richard as the man who had saved their lives, and refused to fight him, causing a political embarrassment to the French king. Nobles inter-married across political and geographical borders, creating a wide network of kinship. Men faced each other over the battlefield, and sometimes stood side by side on a different battlefield several years later, or went on Crusade together, or fought against each other in tournaments across Europe. Six degrees of separation probably could have been played across multiple households and countries.
Oh and did I mention the entourage? Because nobles didn't just hop on a horse and ride across the country to another house. They took several members of the household with them, such as a squire or two, maybe some extra guards, a few servants following with the necessary luggage on a wagon etc etc. So you'd need several people to be in on the scam too, and having more people involved makes it more likely that you'll be betrayed.
That said, as I mentioned above there was potential for some fraud by nobles towards their own kind. Families could be distant, and if someone showed up claiming to be a second cousin from their mother's side then in theory they could get away with it. But it would be exceedingly difficult and highly unlikely. There's a few stories of nobles hiding their appearance to test others, such as King Charles hiding from Joan of Arc to see if she can find him. Joan of Navarre (Queen of England as the wife of Henry IV) reportedly hid among her women when one of her sons visited as a test to see if he could remember her. But these are more apocryphal stories to show that Royal blood/noble spirit shines through.
Sources; The story of Richard of Cornwall is included in "Four Queens" by Nancy Goldstone (Richard's second wife was Sanchia of Provence, one of the women discussed in this book) "The Greatest Knight: The Remarkable Life of William Marshal" by Thomas Ashbridge is a great read on the life of a knight, albeit one who lived when aspects of chivalry and courtly etiquette were still being hammered out. But it gives a great overview of how a noble was raised, educated and lived. General comments I've made about Kings (Henry III, Richard I) are from Dan Jones' book "Plantagenets".