The simple way might be to use 2x4s to construct a twin bed-sized loft and then place a regular twin bed beneath the loft at a right angle. You can then build in a desk or a chest of drawers as well as a ladder. Be sure you make the connections and supports sturdy and strong so the loft will be safe.
There is no short answer to this question, unfortunantly. You will need plans and schematics based on the dimentions of the matresses you are using, as well as how much space provided, and how high you would like the beds to be.