Ideally, you'll want to do both.
Nothing is duller than a game in which you don't care about winning.
Fight to kill! Look for long diagonals along which to position
a bishop toward your opponent's king, especially after she's castled.
Situate your queen on the same diagonal, behind the bishop,
and you've created a formidable threat.
Back it up with pawns or a knight on the front ranks,
and you're well on your way to victory. Defense is a different matter.
Get your king tucked into one corner or the other,
set up a pawn blockade, and connect your rooks for a strong defense
that should make you feel more resistant to infiltration.
Attacking as if your life depended on it is recommended,
and defending your precious king is essential; more important than either,
though, is the relationship between the two.