How do I caulk baseboard and trim around window and doors before painting?

First, cut a small hole 1/8th of an inch from the tip of the spout at an angle. Don’t cut off too much of the tip. Then, most caulk guns come with a swiveling pin used to puncture the tube. Engage the ratcheting plunger and squeeze the handle. When finished, disengage the ratcheting plunger, and have a rag handy, as caulk will probably continue to ooze out of the tip.