Up until the 15th century, Spain was not Spain as we know it.
Rather, the way regions in the Iberian Peninsula were organized was in different kingdoms. Sometimes they were at war with each other and sometimes co-operated in fighting a common enemy. There was never a dull moment. Frontiers were never fixed and people who one day were citizens of an Arab Emirate could very well end up waking up next day as citizens of a different kingdom (back then, the frontiers were quite a bit flexible). Castile and Aragon were yet to be unified.
That all changed in 1492. In fact, many consider that year as the day of modern Spain's birth. Here are the reasons why:
Language was a big factor in this. 1492 saw the publication of the first "Gramática de la Lengua Castellana" -- a grammar of the Spanish language which established how its people should go about learning and speaking Spanish in Spain. It had been written by a man called Antonio Nebrija (try reading it), and it put an end to centuries of verbal frontiers between one kingdom and the other. It was the first and most important step on the road to hegemony.
And not just nationally speaking. For the next couple of centuries, Spain would become the main world economy, making Spanish the most important language in the world. Missionaries and diplomats, they all became teachers of immersive Spanish in their different spheres, as the world started to look up to the country to dictate the current state of the world.
And it all began in 1492, with that "Gramática de la Lengua Castellana". The country was off to a good start.
No matter what historians say, it wasn't a war or a revolt or a fight what created Spain. Spanish history began because of a marriage between the heirs to two different thrones: Castile and Aragon, which happened to be the two greatest kingdoms in the Peninsula at the time. Isabella of Castile was forced into an engagement with her second-dregree cousin, Ferdinand of Aragon. Although many other engagements came after that one (always forced by her brother, Henry IV), Isabella ended up marrying Ferdinand. As they were too closely related to be able to marry straight away, they got the help of Rodrigo Borgia to obtain permission from the Pope. They got married and the country was pretty much unified and ready to go into action.
For starters, they finished off the Reconquista (the process of kicking the Muslims out of the Peninsula) that had been put on hiatus for about 300 years. Back in their time, Muslim presence in Spanish territory was mainly focused on the city of Granada, which led to a series of battles and then a siege that eventually allowed them to declare the city a part of Spain in 1492. The country was unified, though it wasn't all straightforward - as Isabella and Ferdinand had to fight for the throne in the War of the Castilian Succession.
This allowed them to jump into action. For instance, when France first attacked Italy in the first of the so-called Italian Wars, Ferdinand of Aragon jumped to the rescue of his brother-in-law, the king of Naples, in their first international foray in year: the war of Naples.
Spain really meant business.
And, of course, 1492 is the year when Christopher Columbus first came back to Europe with news of America. He thought he had run into an alternative path to the Indias, but that slight misjudgment changed nothing. There was a new world to be conquered and Spain had a geographical head start. Isabella of Castile thought it a grand idea and it would also be a defining factor in the process of making an Empire out of Spain. The Spanish wars were about to begin.
The country was, after all, on a colonialist spree, as invading other countries was in those days a widespread phenomenon. And Spain wasn't indifferent to it. They were about to conquer Melilla, an enterprise where the Americas would have much to say, and had its sight set on many other countries.
Over the course of a summer, the Spanish were about to generate a lot of buzz.