Their defense though is second to none. Their keeper is good if not exactly as good as the Netherlands keeper in my opinion but he's not a slouch. They rely too much on David Villa for scoring and capitalizing on attacks they generate. They work well at tiring out their opponents. However, as shown by the game with Switzerland that they lost, they do not do well against another defensive team. Their lack of offense versus a good defense virtually shuts down all forward progress by them. This seems to make them antsy and break away from their mode of controlling the ball in the middle to try desperate attacks. This leaves them open for counter attacks that Switzerland was able to make happen. Luckily Switzerland was not an offensive team or they might have had more goals.
One last item of note about the Spaniards that is both a strength and a weakness is they clog the middle. Their short pass game in the middle requires them to have 4 to 6 players very close together. For most teams, this is a disastrous thing to do. That is because most teams do not have 4 to 6 guys that are very quick, capable of one-touch passes and flicks with very good ball control and traps. Without those elements, trying to play the middle all the time is asking to have the ball stripped and jammed back down your goal. However, for teams like Spain that can do this, it can draw in the other team so that when Spain does spread out for an attack they catch the opposition by surprise.
Mostly agree, but disagree about Spain's performance against defensive teams and that they're not good offensively. Look at some of the teams they've won against in the knockout stage: Portugal, Paraguay, Germany. All of them played defensively, but every time Spain was able to get a goal in within regulation time, and without an in-form Torres.
Also, people keep getting amazed why teams like Portugal and Germany end up playing defensive against Spain. I would argue that it's not really a choice. When going against Spain who can completely dominate the midfield, you're kind of forced to go defensive and play the counter.
Spain only scored once in each of those games, but guess what, it's going to be difficult to score against an opponent who is effectively turtling up at the back with tons of bodies inside the box. All three teams (Portugal/Paraguay/Germany) all had extremely organized defences that are hard to beat even if they're not playing a defensive game.
On Switzerland, I would attribute that to the Spaniards not having really settled into the rhythm, given that it was the first game and all (you can see that they have looked a lot sharper and improved a lot since). I would also argue that if the Swiss tried to play a more offensive game they would probably have lost.