Look at the instructions and find out which pieces need to be fit together first. Generally, it will be either the headboard or the footboard, but since every product is different, make sure to check the instructions first.
Stick a peg in the first hole on either side of the first piece to be assembled. If there are multiple holes, start with the holes at the bottom, so you will always have the holes you are working with in sight.
Slide the piece with the holes onto the pegs, making sure that they fit snugly together. If done correctly, you should not be able to see any space between the two pieces, and they will not move.
Follow the directions and repeat Steps 2 through 3 until the bed frame is complete. It is very important to put the pieces together in order so you don't accidentally block off an important hole you will need to fasten later.