Taping off the wall and using a regular straight brush is the most effective and safest. Another way is just take your time and go slowly and steadily.
One option is called cutting, which is basically when you use a nice new brush and a slow, steady hand to paint around the trim or doors yourself. You can also invest in the blue duct tape and place the tape where you don't want to paint over.
There are only one way to paint trim around a door and that is the plain old way. Now, you can do different techiques on the door to make it stand out. You don't want your door to be a focal point. You want a wall, fireplace or staircase to be the focal point.
You can tape off the trim, remove the trim from the wall, if you have a steady hand and a good paint brush you can try just painting the trim. Also check what your local hardware store has to offer there are products designed to paint in corners. You can also use a small roller.