Don't apply painter's tape to fresh paint. You need to let the paint cure so that the adhesive won't stick to the paint underneath. Ideally, wait a couple of weeks before you put tape on fresh paint.
When you're masking off an area, don't stretch the tape. Pull some off the roll and lay it on the surface the tape its being applied to. Once it's in place, smooth over the tape with a credit card to ensure a good seal.
When you paint over painter's tape, always go along the edge of the tape in the direction of the line, don't go back and forth over the tape. That's how bristles and paint end up seeping under.
Let the paint dry to the touch then gently, but steadily, pull it back over itself at a 90 degree angle. Pulling toward or away from the line will pull or push the paint.
If you want to be extra careful, you can use a straightedge and a razor to score the line before you pull off the tape.