It is an attribute of the CPU - whether the CPU is 32 bit or 64 bit.
32 bit CPU works with data units which are 32 bits or 4 bytes wide.
64 bit CPU can perform more calculations per second than a 32 bit CPU.
Rule of thumb : if your computer has less than 4 GB of RAM, then your CPU should be 32 bit, and should be 64 bit if it has more than 4 GB RAM.
32 bit systems can point to 4 GB memory in one go, some applications which need more than 4 GB memory to complete tasks, like games, etc, may need 64 bit systems.
If your windows installed is 32 bit, it does not mean that the processor is also 32 bit(if your processor is 64 bit, you can install either 32 bit or 64 bit OS on it)
It is best to find out your processor name, and then search it online to see whether it is 64 bit or 32 bit.
64 bit hardware / CPU / Software
Three things, wiz. Hardware/Processor(CPU) ==> Operating System(OS) ==> Application Software
Hardware is designed first followed by Operating system, followed by software.
For OS specifically designed for 64 bit hardware/CPU, you need 64 bit hardware/CPU.
For applications specifically for only 64 bit OS, you need 64 bit OS and 64 bit hardware/CPU.
Windows 95, 96, XP are 32 bit Operating systems that can only be installed on 32 bit CPU machines.
Most modern OSes Windows 7, Ubuntu comes in both flavours, 32 bit, 64 bit.
Systems in Real World
Most of the processors designed nowadays are 64 bit.
Currently there are 64 bit CPUs, and 64 bit OSes, but most of the applications are 32 bit application software
If software designed for 64 bit CPU runs on 64 bit OS, and 64 bit CPU, then there is very high performance gain.
3D graphic games and programs don't benefit much if the 64 bit CPU is used instead of the 32 bit. They also need a 64 bit program/game/software. So the benefit is when you upgrade your video card on a 64 bit CPU machine.
It is possible to run a 32 bit software or OS on systems with 64 bit CPU(but it wont give you the performance benefit), but its not possible to run a software for 64 bit systems on 32 bit systems.
Problem is that most of the software available is 32 bit, while the machines are 64 bit.
It is good to have a 64 bit system instead of a 32 bit system, but the real performance is improved when the software is designed specifically for 64 bit systems.
Most programs designed for 32 bit systems will work for 64 bit systems also(except device drivers and virus protection software).
However device drivers for 32 bit systems will not work for 64 bit systems.
Programs designed for 64 bit will not work for 32 bit systems.
So, most of the programs are designed for 32 bit because they work on both(but they don't give good performance on 64 bit).