Hello and welcome to the forum!
Firstly all iphones on the GSM network in America are locked to AT&T, now the iphone has to be on baseband 01.59 so you can unlock it.
So what you do is tap on settings > general > about, then tell me what the modem firmware is. if it is on 01.59 i will give you a link to unlock your iphone 4. if not then your stuck with a ipod touch until there is a new tool to unlock or you can try your luck with one of those permanent unlock solutions but they cost $165 or so bucks.