Mark the Studs and Decide sizing. Using a stud finder, mark the studs on the wall. I like to draw it out about where I want to hang. Then you can cut the pegboard to the size you want.
Make a frame. Start by making a frame for the back of the pegboard from the 1x2 boards. It looks nicer if you can cut the frame at 45 degrees so that each piece fits together but it isn't necessary. We added a brace down the center of the pegboard for stability and to prevent flexing.
Nail the pegboard to the frame. Use flat head nails in the corners and outside centers.
Cut framing trim (optional). We used door casing to create a decorative frame around the outside of the pegboar. Using a miter saw, cut the trim at a 45-degree angle so that the trim pieces fits together. My trim had a 1in overhang so that the sides are hidden. Do not attach these until you decide how to hang the pegboard.
Screw the pegboard (without trim from step #4) into the studs around the outside of the frame. This area will be hidden by the trim.
Add a thin layer of wood glue around the edge of the pegboard and use finishing nails all the way around the trim. Let the wood glue dry.
Fill the nail holes with caulk or wood filler, let dry, and sand smooth if desired. Paint the frame if desired.
Hang accessories as desired.