When you stimulate both a female's clitoris and G-spot (found about an inch inside the vagina, on the upper wall) at the same time.
Squirting doesn't happen to everyone. It's estimated that only 10-50 percent of females can actually squirt, and there's nothing wrong with you if you can't.
The liquid that comes out of you when squirting isn't just pee. It does contain some pee but it also has prostatic-specific antigen, produced by the skene's glands.
"I squirted for the first time last night, squirting is the best!"