Sometimes when you bring a video clip in from your iPhone 3GS to iPhoto and iMovie, the programs think that the image was shot in portrait mode (taller than wider) instead of landscape mode (wider than taller). When you look at the movie in iPhoto, the video is sideways. When you bring the video into iMovie, the video is often upside down, depending on where you hold the lens. (Try to keep the lens in the upper corner, not the lower one.)
Luckily you can rotate a movie in iMovie very easily. First, add your video clip to your project, then select Cropping & Rotation from the Action menu in the bottom left corner.
At the top of the video you’ll find the rotate buttons. Click them until your video is rightside-up.