How can I install both Snow Leopard and Lion on the same machine?
Yes, it is possible. You need to create a new partition and install the other OS on it. Here's a detailed tutorial. The basic steps are:


Create a new partition using Disk Utility.
Install the new OS on the new partition.
Set default boot partition using Startup Disks.
Manually select boot partition at startup holding down the &#x2325; key.