Stick painter's tape to the ceiling along the edges where you are going to paint. This tape is easy to apply, is wide and won't pull off the paint underneath when you remove it. This will protect your ceiling from painting mistakes and will help you paint a straight line between the ceiling and wall.
Use a 3-inch paint brush and paint a line across the top of the wall, below the ceiling. Use light pressure on the paint brush. You don't want it to fan out while you work. Use smooth, even strokes.
Finish painting the wall with a roller brush. If you are doing two coats of paint, repeat the steps.