yes this is very possible. First you would need two partitions. Frankly I myself like to keep at least one operating system on it's own hard drive for safety reasons. Example, I am most familiar with XP so I have that OS installed on it's own 120 GB drive and I have all my other OSes on another drive.
Will you use a second drive?
If you use a second drive go ahead and format and create your primary partition or use the whole drive whatever you want. Install XP first(on it's own partition of course) and then install windows 7(be sure to go to custom setup when you install and chose the drive you want it to go on.) Windows takes care of letting you know which Operating Systems you have after your done. You get a boot up option. It's that simple.
If you use one drive then you have to make some room on it for two OSes.