This story shows you how to create a mortise-and-tenon joint.
Measure and mark for a tenon's length and shoulders on the end and all four sides of the stock, using a combination or try square. Make the tenon from one-third to one-half the stock's thickness and about 1/16 inch shorter than the mortise's depth. In a through mortise, the tenon should be 1/8 inch longer than the stock thickness of the mortised piece.
Tightly clamp the marked tenon piece in a bench vise, using scrap wood to protect the sides of the piece from the clamp jaws. With a back saw, carefully saw through the end grain to the shoulder line on either side of the tenon. Make sure you keep the saw perpendicular to the wood. For a four-shoulder tenon, make two more cuts down the narrow sides.
To complete the tenon, remove the piece from the vise and securely clamp it in your miter box with a waste side up. Use a back saw guided by the miter box slots to free the waste from one of the tenon sides. With that cut complete, turn over the piece and repeat. If the tenon will have four shoulders, turn the piece on edge to make those cuts.
You can cut a mortise with a mortising chisel, but an electric drill is faster. Using a bit about the same diameter as the mortise width and a drill stop, drill overlapping holes to remove most of the waste. For a through mortise, place scrap wood under the piece to prevent splintering.
After drilling, clean up the sides of the mortise with a sharp chisel. Keep the chisel's bevel facing into the mortise. Be particular about the mortise corners; they must be smooth and square. For a through mortise, turn over the piece and use the chisel to clean up the other side too.