Can I Get A iphone 4 Or 5 Activated?

I have a HTC Titan (windows phone) and I want to get a iPhone 4 or 5.Im with at&t but I want to buy the phone off of someone and have it activated with at&t, is that possible? Reason being, I've only had my phone for a year and would have to pay alot of money to break the 2 year contract then pay even more to get the phone through at&t after that, I thought I would be able to take my sim card and transfer it to a iPhone but there not compatible and would have to cut it to fit but I want everything legit. Can someone help?

I'm not sure with at&t but it might be the same as verizon where you can switch to the phone you want as long as the contract with that phone is no longer existing but you can't buy a new one from them unless your phone is broken or something.