A guide (such as a comb) will help you out.
For example, if you want to trim your mustache straight across, place an ordinary comb through it, parallel to the floor (like a shelf). In the mirror, make sure it looks level. Then, trim all the hairs underneath the comb, making sure to keep the comb level in the mirror the whole time.
If you want a more complicated mustache, put the comb on the right half, for example, and make sure it is exactly where you want it. Then cut off all the hair underneath the comb. Move the comb to the left side of your mustache, make sure it looks perfectly-placed in the mirror, and then trim off all the hair underneath it.