To get into to cheat mode press CTRL + SHIFT + C during game play. Once you are in cheat mode, simply type in the cheat and hit enter.
* - For unpatched version
Code Effect

klapaucius* 1000 Simoleons
Rosebud 1000 Simoleons
water_tool Create Streams
dump_happy Dump selected sim's recent list of scored interactions to a file
! Repeat last cheat

; Separate multiple codes

set_hour <1-24>* Set time of day
grow_grass <0-150> Grow grass
map_edit off Disables map editor
map_edit on Enables map editor
move_objects on Move any object
autonomy <1-100> Set Sims ablitity to think
draw_floorable on Foor grid on
draw_floorable off Floor grid off
edit_char Make a Sim
house file Import a house

hist_add Add history stat to family
history Save family history file
prepare_lot Fix required lot objects
import Import a family file
interests Change interests of Sims