When building your bunks, consider the size of the mattress you intend to use. Generally twin size is best although a king size can be made. Build the frame to be about a half-inch larger than the dimensions of the mattress. When determining the height of the support poles, make sure the person intended for the bottom bunk can sit up comfortably in bed. Be sure to leave at least 12 inches of pole above the top level of the top bunk if you intend to include a guard rail.
Both bunks are essentially a slab of lumber on a frame. The simplest design is to build a frame from four 2 x 4 beams with plywood on top. You can modify this to your heart's content, using fancier wood or more complex frame options. chesThe key is to make it sturdy, and to be certain the mattress will fit.
The support poles should be thick, at least 6 inches x 6 inches. Again, you can use basic timbers or go for something more ornate. Attach them to the bunks using heavy bolts through pre-drilled holes, two per corner per bunk.
Consider details you want to include beyond the basic design. Do you want to stain or paint the wood? Do you want to include a ladder, or guard rails? Do you want to do something more fancy, like building in a dresser or shelves on the ends? There are countless possibilities, limited literally by your imagination, time and budget.
A platform bed is a fun variation on bunk beds, where there is only a top bunk, leaving space for a desk, chair or storage below. If you want to try this, be sure to attach three sides (2 short and one long) about 2 to 3 feet from the floor. Otherwise, the support poles won't have enough stability.
Another variation is to place a mattress only on the bottom bunk, leaving the top bunk for storage. This uses the same methods as building a regular bunk bed.