If you want a crisp line where your paint job ends, use the right type of masking tape. For standard wall painting jobs, stick with a basic blue painter's tape. If you're a slow painter or don't want to have to worry about removing the tape for a few days, try a slow-hardening adhesive tape, like Scotch No. 2090. 2090 comes in both a standard masking tape and a less adhesive version for delicate jobs, and it can be removed relatively easily for up to 14 days. For edging off fireplaces or other rough surfaces, try something with a bit more staying power, such as Scotch No. 2060.
Before applying masking tape to the edges of the surface you're planning to paint, wipe down any areas where the masking tape will stick. Dust, animal hair and other matter can cause the tape not to lie flat, creating a pocket for a possible paint drip. The surface beneath the masking tape should also be completely dry before paint is applied. Too much moisture can keep masking tape from adhering properly.
If your tape is straight, flat and even but you're still worried about paint seeping underneath, seal the sides. For standard paint jobs, apply a stroke of your base color paint along each edge of the tape and allow it to dry. Once the base coat is dry, paint the room. If you're creating stripes, another trick is to seal the sides of the tape with a thin layer of latex caulk, like the kind you buy at home improvement stores. Squirt some caulk out of the tube in a straight line and wipe it down until only a thin layer remains. Paint your room. Remove the caulk a few hours later.
Once your paint job is finished, let your paint dry through completely. As soon as you can, remove the masking tape. Masking tape left for too long can adhere to your baseboards or other objects, making it difficult to remove. This is especially true in humid climates, where moisture can make the tape adhere more fully.