Measure the width of your bed to determine how wide the headboard needs to be. For a single bed, this will be between 39 and 40 inches, for example. Decide on the height you want the headboard to be.
Cut two planks of 2-by-2 lumber to the desired width of the headboard, and two planks to the height, less four inches. For example, if you want the headboard to the 30 inches high, cut the lumber to 26 inches.
Drill two pilot holes, sized for the shaft of a 2 1/2-inch wood screw, through each corner joint of the frame and fasten the frame together with 2 1/2-inch wood screws through the pilot holes.
Saw a piece of 1/2-inch plywood to the size of the frame and lay it on top of the frame. Secure the plywood to the frame with 1-inch screws driven every 5 to 6 inches around the plywood edge into the frame underneath.
Cut a piece of 2-inch-thick foam to the size of the headboard using an electric knife. Keep the knife straight while cutting so the edges of the foam are straight.
Spray the back of the foam with spray adhesive then glue it to the plywood.
Lay out your leather or faux leather piece wrong-side up on the work surface and place the frame foam-side down on top.
Pull the edges of the leather pieces over the back of the frame and pin it to the frame. Go around the whole frame so that the leather is pulled evenly across at the front. Fold the corners neatly using "hospital corners" like those you create as you make up the sheets on your bed.
Turn the frame over and check the positioning of the leather. If the pull and stretch are fine, then continue; otherwise re-pin the leather as necessary to achieve the desired look at the front.
Turn the frame back over and staple the leather in place on the back of the frame with a staple gun. Remove the pins and trim off the excess leather using scissors.
Mark a level line on the wall above the bed, 2 inches lower than you want the headboard to be when mounted on the wall. Use a stud finder to mark the positions of the wall studs on the line
Cut a length of 2-by-2 lumber five inches shorter than the width planks you cut for the headboard frame. This will be the wall cleat for mounting the headboard.
Sit the wall cleat under the level wall line and secure it to the wall studs with two 3 1/2-inch drywall screws through the cleat into each of the stud positions you marked.
Lift the headboard up to the wall and center it over the cleat, letting the top of the headboard frame rest on top of the cleat. The headboard should be flush against the wall, the cleat completely hidden.
Secure the headboard to the cleat with 2 1/2-inch wood screws driven every 6 to 8 inches through the top of the headboard frame into the cleat underneath.