Spain and Portugal are the two countries that inhabit the Iberian Peninsula. They're actually so close, that people could be tempted to think that they were one and the same country. They do, actually, share a great deal of history, they have very similar cultures and their languages are closely related.
But do the Portuguese speak Spanish? Or do they at least understand?
The short answer is no; the Portuguese don't speak Spanish. The Spanish language is the third most common foreign language in Portugal and is spoken, to a certain extent, by 7-10% of the Portuguese population. The Portuguese don't, generally, understand Spanish either, and for a Portuguese and Spanish speaker to be able to communicate, each one needs to adapt and to make a lot of effort.
Spanish Proficiency In Portugal
Despite the proximity of the two countries and how the two languages are related, it would be wrong to assume that Portuguese people speak Spanish. The two countries and languages have developed separately for centuries, after all, and most Portuguese don't understand Spanish at all. (The same is the case in Brazil, where very few speak Spanish, despite the neighboring countries being Spanish-speaking).
Depending on the sources you look at, between 7% and 10% of the Portuguese population speak some Spanish. Compare this to French which is spoken by between 10-15% of Portuguese, and you'll see that the geographic proximity and cultural similarity isn't always an indicator for a shared language.
While Spain and Portugal are obviously two countries with an extremely tight-knit relationship, Portugal has historically been very close to France also, and in the last decades, many Portuguese have migrated to France for different reasons, which might explain, in part, the high French proficiency in Portugal.
In the Portuguese school system, the first foreign language taught, is English, which starts early when children first begin in school. Second languages are generally not taught before the 7th, 9th, and 10th years when students are able to choose between French, Spanish, and German, and although Spanish isn't the most popular, Portuguese who study Spanish tend to learn quickly.
When Portuguese people need to communicate in Spanish, however, many tend to adapt their Portuguese with a few Spanish words and a perceived Spanish-like pronunciation, (often referred to as "Portuñol"). Due to the proximity of the two languages, simple communication is possible this way. But it's not really Spanish!
Mutual Intelligibility of Spanish and Portuguese
Like most other "Romance" languages such as French, Italian, and Romanian, Portuguese and Spanish both evolved from the everyday "Vulgar Latin" language spoken in the Roman empire.
What's special about Portuguese and Spanish, however, is that the two languages evolved side-by-side on the Iberian Peninsula where they received many of the same influences. Portuguese and Castilian Spanish was the same language for centuries after breaking with the other Latin languages. They both developed in close proximity to the original Celtic languages spoken in the region, the Arabic and Berber languages of the Southern occupiers, and the Mozarabic language.
When you compare the Portuguese spoken in the 15th century to the Spanish from the same period, the two languages seem very close, and for good reason, since they were much more similar back then than they are today. In the following centuries, the Spanish language went through a lot more changes than it was the case for Portuguese, which is a more conservative language.
When speaking of mutual intelligibility, Spanish and Portuguese are closer in their written form than orally, but if each speaker takes care to speak slowly and find the right words, it's possible to communicate. It might be slightly easier for a Portuguese speaker to understand Spanish than a Spanish speaker to understand Portuguese, however.
Conclusion: Do The Portuguese Speak Spanish?
To answer quite simply: No.
The Portuguese population doesn't generally, speak Spanish, and with 7-10% of the Portuguese population being able to get by in Spanish, it's not the most popular foreign language either.
With a little effort, though, it's possible for Spanish and Portuguese speakers to communicate, but each speaker needs to adapt to the other.