If you can still access this drive then you can back up to another drive or CD/DVD's.
If you cannot access this disk you can slave the drive in another computer to retrieve the data.
Even with an Upgrade version of XP you will retain your data and programs as long as you choose the Upgrade (Repair) Install rather than the Clean (format).
In the long run the Clean format would be preferable but it is not necessary.
Although data can be retrieved prior to a format Programs cannot as they need to be installed into the registry. A Repair (Upgrade) should leave them intact but it is not always certain.
This site offers very good guides and options:
http://michaelstevenstech.com/index.html