The iMovie app was designed specifically for the iPhone 4 and isn't made available for prior generations, but the clever folks at Redmond Pie have figured out a way to port it to the iPhone 3GS. And it works well!

You can find instructions on how to get the app onto a jailbroken iPhone 3GS over at Redmond Pie if you want to try this out yourself. [Redmond Pie via 9to5 Mac]