"Spain" is the English equivalent of the Spanish word "Espana"; which his derived from the Roman Latin name for the region "Hispania" which may be a variation of "Hesperia" meaning "Western Land"
Spain was called Spania by the Visigoths, and Hispania before by the Romans. Medieval Spain was divided into few kingdoms, most important were Kingdom of Castile and Kingdom of Aragon.