when at home (apartment, whatever) keep it somewhat out of sight but accessible. use at least one u-lock to something very sturdy. if possible, use two-ulocks. one for each wheel. if you can, keep it in a garage/shed. even so, still use a u-lock or two.
when out about town, lock it to something like a bike rack or a street sign. you should be ok if you leave it there for a short bit. like on campus or outside a restaurant or something. if you can't find any place to lock it, put it someplace close to where you and other people will see it and lock through the back shocks/wheel. it'll prevent anyone from rolling away from it and anyone messing w/ it will look suspicious.