Will my sim card for tmobile work for at&t?

Well i have a tmobile sparq and an iphone 3gs and only can use my tmobile phone. Is there any way i can put my tmobile sim card into my iphone? And also i do not know how to unlock any one of my phones

The iPhone will only work if it unlock.

It will work just fine, but it has to be unlocked. If you bought it directly from Apple for the full price (starting at $649), then it's unlocked. If not, you need to jailbreak it (use Greenpois0n) and then unlock it with Ultrasn0w in Cydia.

If you need to unlock your iPhone, You can unlock it through remote unlocking method. It is the safest and easiest method to unlock any iPhone model. It is also an affordable method too. You can get the remote unlocking for an iPhone from Wickedunlock.com All the best mate.