Usually you can just use any number of the slots. However, some mainboards have limitations. I once had one that needed two slots to have the same size memory, e.g. slot 1: 1GB, slot 2: 1GB, slot3: 2GB worked and slot1: 1GB, slot2: 2GB, slot3: 1 GB didn't.
So it's always best to check the handbook that came with your computer. Anyway, you can try installing more than the 2 GB (maybe borrow some RAM from a friend to test it before purchasing your own). I have seen systems that will take as much RAM as you install, even when the specs say they have a 2 GB limit.