A 32 bit operating system can only utilize around 3 gb of ram so that is normal. It you want your operating system to take advantage of all 4gb or more you have to upgrade to 64 bit operating system. However your computer still should be running pretty fast with 3 gb ram. You should check what background tasks are running and if you have spyware or malware.
Did it suddenly become slow (like in day or two)? If so, then it is some program that is hogging the resources (the processor most likely). If not, then it's the hard drive that needs to be checked and fully defragmented (it really slows everything down with time, especially in Windows XP). All you can try that will really affect anything is disable startup programs in msconfig (not services, as most are needed), delete stuff you don't need from your hard drive and defragment it (leave it overnight if you have to). Other than that, your only option is reinstalling Windows (maybe getting 7 in the process ;-).
Just re-install windows on a freshly formatted drive. It really needs to be done every 1 to 2 years, in order to keep your system running at optimum.