When I try to install Linux Ubuntu on my PC with Windows XP, the Linux installer wants to erase everything and install Ubuntu. It does not detect partitions.
Ubuntu, or any Linux, will detect your Windows partition; it will shrink the Windows partition to create space to install itself IF there is space available to do so. It will offer the choice to install alongside Windows and you will be able to adjust the partition size for Linux, just by using a slider.
I have installed many Linux and Ubuntu systems and never seen what you describe. If the installer cannot see your Windows partition then you have a hardware fault, a very old Ubuntu version, or some other fault.
A good way to start is (a) in Windows, delete old data and applications to create space; (b) run defragmenter; (c) download the Linux image - Linux Mint is a good derivative of Ubuntu for new Linux users - make sure you choose 32-bit for your system (if it is 32-bit); (d) burn the image file (iso) to a dvd. Then boot from the dvd and follow instructions.
You will probably have to do this the manual way. Windows comes with a disk management utility that will help you create a partition easily from your existing partition.
Once you've created another partition just restart and install Ubuntu onto that partition.
How to use Disk Management to configure basic disks in Windows XP
Separate Your Data from Windows on a Standalone Partition
You need to have a free partition on your drive if you want to dual-boot. I've never tried it, but I don't think that the Ubuntu installer can shrink an existing partition in order to make room for itself, you need to do this before you try installing. Once there is either unpartitioned space or an unformatted partition, you should be able to easily tell the installer to drop Ubuntu there.
What you are seeing is probably the result of a single-drive system that has one partition that covers the entire disk with WinXP installed there. Shrink the drive to allow room for at least a 20GB partition for Ubuntu and another partition for swap space equivalent to the amount of RAM installed in your computer. For example, if you have 4GB of RAM, create a 4GB partition for your swap space. You will probably need to manually configure how Ubuntu utilizes your drive space instead of letting it make decisions about it.