I want to buy an iphone 4s or an iphone 5?

I'm new to the world of iphones, so how does the contract thing work out. I know you don't pay a whole lot when you sign up for the contract, but do you have to pay every month or what?

Yes. Monthly for 24 months.

Right, you signup with carrier and when you walk out your iphone is activated and working. The monthly cost just goes to your credit card automatically.

It's better to go for an iPhone 5.
The next iPhone is coming, so 4S would be pretty much outdated in a year.
And yes, you might have to pay $50 every month for two years, if you sign a contract.