I have tried by using samsung kies but it says there are no updates. i have even tried to update it within the phone (software update). Other people are on android 2.3 but i am still on 2.2.1 and it won't update
As you've got your device with a contract, this added a special barrier to updates. Short explanation how that goes:
- Google (or rather the AOSP, Android Open Source Project) releases a new Android version. This is usually immediately available to Nexus devices -- but...
- Device manufacturers need to adapt it to their hardware (drivers etc.) and, in many cases, their special "skinning" (HTC Sense, Samsung Tourchwiz, Motorola Blur, etc), which again at least delays availability of this update
- Carriers using their special branding (boot logo, special apps, and more)
So if there's a new Android version released by the AOSP does not necessarily mean it becomes available for all Android devices. It might get stuck already in step 2 if a manufacturer decides to no longer support a device (in your case that happened after the 2.3 release, so 2.3 is the latest "official version" available to the device) -- and even if it passes this step, but you've got a branded device, it might get stuck in step 3 (which most likely is what happened to you).
The only way out if got stuck in steps 2 or 3 is checking for custom ROMs. As that "getting stuck" also affects developers, they often decide to build their own ROMs. Many times this is done by porting a ROM from compatible devices, adjusting the missing stuff (or leaving some gaps, so there might be things not fully working, which then is pointed out in the instructions).
So if you want to go the "do-it-yourself" way (after having t-mobile unlocking the device, if needed), check How do I root my Samsung Galaxy S? for how to root your SGS, and Where can I find stock or custom ROMs for my Android device? for fitting ROMs. The "how-to-flash" usually is described on the page you can download the ROM from.