I mean, I'm not sure I fully understand your question so feel free to clarify and I'll try to help to the best of my ability. The way I read your question is basically "Were squires real?" to which the very short answer is yes. Another possible interpretation or second part of the question is "Did they accompany knights as seen in fantasy fictions?" to which the answer is, kind of, it depends on the fiction, the part of Europe and the time period you look at.
Medieval is a pretty arbitrary period which can, depending on your chosen start and end dates, encompass 1000 years of history and Europe is and was a very diverse place where the institution of knighthood had very different meaning depending on when and where you looked. To answer the second part very briefly, yes, in parts of Europe for parts of the middle ages you would have found squires accompanying knights and performing duties often reflected in modern day fantasy writing.
With that said, let me elaborate a little on what I mean by variance in meaning depending on time period and location. A knight can be a great many things depending on where and when you look, and so can a squire. Very basically, if we look at the early/mid medieval period a knight in Europe was a mounted warrior. He may or may not have fought on horseback, there was little or no standardization of equipment and knighthood was yet to develop into an institution. I would argue, although I should preface this by saying that there is no absolute consensus on the topic, that the status of knighthood began to develop into an institution with the carolingian conquests when lands or other privileges began to be distributed for service to the king.
With the gradual advancements of technology over the centuries following the fall of the western roman empire came the advancement of mounted combat. Armor became gradually heavier, more complex and more expensive and along with it came increasing demands on those who served as mounted warriors. When coupled with increasing wealth of these individuals the need and possibility to keep a servant with them in the field arose and here we see the first proto-squires arise. Initially it may not have been a considered a path to knighthood so much as duty that could be performed by a son or other younger male of the knights family. However, as these individuals were often expected to at some point inherit the positions of their fathers the life of the squire came to include martial training.
The position went from a young male servant who followed a knight on campaign to a knight in training who was expected to become a knight in his own right eventually. He may have fought in battles but that was far from certain and the squires were certainly considered of secondary value to the knights themselves. As the institution of knighthood came to be more of a marker of social status and wealth the squires evolved too and if we look at the late 15th century in France as an example, a knight and squire were both most likely to fight as men-at-arms, that is, as mounted or dismounted heavily armored professional soldiers.
As the position of knighthood came to move past the origins of martial status and become fully a noble title, so did the position of the squires until it came to mean, in many countries, any member of the landed gentry with no military connotations whatsoever from which one could, but by no means certainly would, be a awarded a knighthood.
TL;DR - Yes, depending on which "fantasy fiction" depiction you look at and which type time and place in Europe you compare it too there have certainly been squires whose service closely resemble that of fiction.