If I restore an Iphone 4 will it restore to IOS7?

So yesterday I won an iPhone from a claw machine and for some reason it says it has 2.7 gigs of memory used on it when nothing is on it. But anyway I want to restore it to get more space and other reasons. It has IOS 6 on it, when I got to restore it will it go strait to IOS 7? And it's an AT&T model but the note in it said it was unlocked will it mess that up if I restore it or no?

No. No mess up. It'll restore back to 6. You will have to upgrade it to 7 after the reset. Best luck.

2.7GB is usually iOS itself & files necessary to it.
Likely yes it would go to iOS 7.1.2 (latest & likely last version of iOS for that model)
Depends on the unlock method used. If software, yes (pretty likely), if through some service then likely not.