The Standard Spanish comes from Castilla-La Mancha. Central Spain. but it is also spoken in all Spain.
Spanish has different dialects. For me, I would say, the most difficult for a foreigner is the dialect spoken in Andalucia, South-Spain.
In addition in Spain we have other languages, So in some places we are bilingual speakers.
I am from Catalonia, where Barcelona is placed, we speak Spanish and Catalan.
In Galicia, they speak Spanish and Galician.
In Asturias, they speak Spanish and Asturian.
In País Vasco, they speak Spanish and Euskera.
You can go anyplace in Spain to learn Spanish. Dialects mean they have different accents and maybe small differences in some expressions but you'll be understood all over Spain.
Hope this helps!
Have a nice day!