Pro tip: Test your masking tape on a scrap piece before trusting it on trim
I learned this the hard way when I tried to paint the edges of my door frames last month. I used a new brand of tape that claimed to be 'super adhesive' and just peeled it right on. After finishing one side, I pulled the tape off and found a wavy, bleeding line of paint everywhere! It looked like a toddler did the job. I had to sand down the mess and start over, which wasted a whole afternoon. To make it worse, I accidentally knocked over the paint can while frustrated, splattering my shoes. Now I always stick a bit of tape on some wood and paint over it to check. Trust me, a two-minute test can save you from a huge headache!
Sometimes the tape isn't the real problem. @elizabethmason mentioned heat making tape gummy, but I've found that pressing the edges down hard stops most bleed. Like when I painted my kitchen cabinets, I used cheap tape but got clean lines by rubbing the edge with a putty knife. If the paint is too thin or applied thick, it'll seep under any tape. A quick test helps, but good technique saves more time in the long run.
That 'super adhesive' tape really put the 'super' in super disappointing, huh? Nothing like learning life's little lessons with a sanding block and ruined shoes.