It depends when you are talking about. France and Spain were allied earlier in Napoleon's reign, and their combined fleets fought together against the British at Trafalgar. However, this allegiance swiftly became a conquest and annexation as Napoleon removed the Spanish king and placed his brother on their throne. This was met with wild hostility from the Spanish.
There were some Spanish who supported the French (known as afrancesados) but this wasn't a well defined group. Some were nobles who wanted to keep their land and privileges under the new regime, but most were middle class intellectuals who still believed that the French revolutionary values were a good thing. Given how corrupt the Spanish monarchy was, you can understand why they might like the idea of republicanism, but by this time (1808 or so) the French Republic had become Napoleon's empire and thus had lost it's semblance of democracy.
It's hard to overestimate just how much the Spanish people hated Napoleon and his French armies. We get the expression "guerilla war" from the Spanish partisans who fought the French. Guerilla means 'little war' but this was anything but small. There were lots of partisans in Spain, and the French were forced to commit major forces just to try and keep hold of the conquered land. A big part of the Spanish loathing for the French was because they lived off the land; which means that they pillaged just about everything to feed themselves, leaving the local people to starve. And pillaging itself including killing and stealing from the locals as well as genuinely atrocious war crimes just as part of the day to day running of the French army.
So; in general we can say that much of Spain loathed Napoleon. Even those who weren't fighting them weren't happy. Spain was quite nationalistic and had been defeated and conquered, and then the French savaged the local lands because they couldn't feed themselves any other way.
While it's not often talked about so much, the guerilla war fought in Spain was a significant contributor to British victory in the peninsular war, both by gathering intelligence and by forcing the French to keep troops garrisoned in Spain instead of fighting Wellington. Given that the French would at least execute partisans, if not torture them to death, we can see how most of Spain thought about Napoleon.
In so many words; the attitude of the Spanish towards Napoleon was approximately the same attitude of the Vietcong and their civilian supporters towards the US during the Vietnam war.