When "Spanish" is used as a noun, it means the "The Spanish language". It cannot be use to mean a person from Spain.
Do you speak Spanish? (good)
Are you a Spanish? (incorrect)
When "Spanish" is used as an adjective, it can refer to anything from Spain.
I like Spanish architecture.
Spanish food is my favorite.
I can speak the Spanish language. (I can speak Spanish.)
If you want to refer to a person from Spain, you can also use the word "Spaniard".
My friend is a Spaniard.
My friend is a person from Spain.
My friend is a Spanish person. (this is grammatically correct, but very awkward)
You only use the word "Spaniard" to refer to people from Spain. People from Mexico are Mexicans, not Spaniards. People from Peruvians. Etc.
But you can use the word "Spanish" as a noun (the language that is spoken in Spain, Mexico, Peru, etc.) or as an adjective to describe other things that have been brought from Spain to other countries.