If it's a boss, I try to kill them a few times to learn their moves--The best example of this was the latest one of my feats: the last boss of Prototype, because it required dodging and a hell of a lot of planning. Took me 4-5 tries, but I finally learned the right strategy to beat that bastard once and for all. I hate timed boss battles because it's difficult to adhere to the same strategy you've been doing the rest of the game, and then it throws a brick wall in front of you because the boss is mostly resistant to your normal strategy or does what you do better.
If it's a level in a game, it depends on what I'm stuck on: a puzzle in the game, or difficulty with finding out just what to do. A puzzle in a game may go one of three ways: trial and error until completed, if that isn't working then I look it up, and if that isn't working I just quit, like with Tokobots. The second level has a puzzle that after about 10 trial-and-errors I finally snapped, turned off the game, and deleted it from my PSP. However, if I can't find out what to do I look it up, and if that doesn't work I quit and say "Fuck you game, it's not my fault you didn't tell me what to do."
In RTS games, I generally just change my strategy because most times that's really all it takes, and in games like Plants vs. Zombies it's a matter of changing plant line-up. Again, it depends on what I'm stuck on and what type of game I'm playing--shooters generally involve me getting stuck on a fight, puzzles generally involve getting stuck on a puzzle, RPG means I need some type of new weapon, armor or the like, and strategy games involve patience and re-thinking.