If the phone is unlocked you can use it with AT&T network. To check the phone lock status Go to Settings>>Options>>Advanced Options>> SIM Card. Hold the ALT Key while typing in MEPE or MEPD or MEPPE or MEPPD (you will not see text appear on screen while typing) the phone will display the lock status of the phone. If the network provider is Disabled, then the service provider is unlocked and you can use it with AT&T network. Else the phone is locked you need to unlock the phone.
You can get the unlock code through online..........give your IMEI number and get the unlock code for ur mobile.... i will suggest the website Superunlockcodes.com
which is doing good service .....you can approach this website. This site is nearly perfect and they were recommended highly in the cell phone forums. I used them to unlock my cell phone. contacted them and within 30 mins i had my unlock code and my phone was unlocked.