Use a Sharp Saw Blade
You can't cut perfect miters with a dull blade, one with too few teeth or one that's designed for ripping. Check your blade for sharpness by cutting a 45-degree miter on a 1x3 or larger piece of oak or other hardwood. If the blade cuts smoothly with very little pressure and leaves a clean, almost shiny cut with no burn marks, it's sharp enough to cut good miters. When you check your blade or shop for a new one, look for one labeled as a “trim” or “fine crosscutting” blade. A 10-in. blade should have at least 40 teeth, a 12-in. blade at least 60. If the blade is for a sliding miter saw, be sure the teeth have a hook angle of zero to negative five degrees. Teeth with a neutral or negative hook angle are less aggressive and safer for sliding miter saws. Expect to spend at least $50 for a carbide-tipped blade that'll perform well and last.
Try out the table saw miter sled in the video below to get started.