Rip 1x to size with a table saw.
Safety Alert: When using a table saw, make sure you use a push stick instead of your hand to push the wood through the blade.
Sand all the pieces with an orbital sander. Sanding removes the imperfections in the wood and provides a nice, clean surface for the stain.
Use a sponge brush to stain the sides of the wood that will be showing, making sure to go with the grain of the wood. Let it sit for a few minutes, then wipe off the excess with a clean, dry cloth. If the color is not as dark as you desire, apply another coat and again wipe off any excess.
Once the stain has dried, measure and mark for the correct length and then use a miter saw to cut the pieces on a 45-degree angle. To make the corner, flip the trim piece over and cut again. This provides the reverse 45-degree angle to match the other trim piece.