The worst way to prepare for a Game Jam is to stay up all night so you can be there for the theme announcement if it's at night. Before you start programming, if possible, take a walk or a shower to get some thinking or brainstorming done without staring at a screen. Come up with a few different ideas to pick from, and remember to ask and answer the question: What does the player *do* in the game?
To finish your game before the deadline, don't get caught up on polishing or deciding whether the player character has green or blue hair. Toss out unnecessary extra features unless you have a lot of time left after finishing the core game.
A great way to come up with an idea to fit the theme is to look up the dictionary definition of the theme. Google an image on the theme. Check what the Wikipedia page for the theme says.
If I could give one piece of advice to newcomers, it would be: Don't worry about your game being shit. It probably will be, and that's all...