Set the miter saw at a 45-degree angle for the first cut. Firmly place the piece of molding against the miter saw guide so that the finish surface is facing you and cut the 45-degree angle on the end of the molding.
Adjust the miter saw to the opposite, 45-degree setting to cut the opposing angle. Again, place and hold the molding firmly and cut the 45-degree angle. You will now have two pieces of molding that, when butted together, form a 90-degree angle.
Sand the cut edges lightly with a fine grit sand paper to remove rough edges, then place the pieces of molding. Check the fit of the two pieces. It is likely that you may have a small gap due to the walls not being perfectly square. Fit them for the best appearance that you can and secure the molding in place.
Fill any small gaps with wood putty that matches the finish of the molding. If you are painting the molding, you can paint over the wood putty.