Squirting is a phenomenon where fluid is released before or during orgasm. From self-reports, anywhere between 10% and 70% have experienced it.
The first scientific report on the phenomenon came from 16th century physician Laevinius Lemnius, reporting a case of a woman who "draws forth the man's seed and casts her own with it". In the 19th and early 20th centuries by physicians such as Freud it was often treated as pathological, related to hysteria or lesbianism.
What research there is suggests that there are three distinct phenomena going on. These are termed female ejaculation, squirting, and coital incontinence.
Female ejaculation is the release of a small amount of a thick, milky fluid from the paraurethral glands, a pair of glands on either side of the urethra.
Coital incontinence is leaking urine during penetrative sex, and is often linked to other forms of stress incontinence.
And as for squirting... it's complicated.
Squirting is typically defined as release of a thinner fluid through the urethra. Much of the research into squirting has focused on what, precisely, is in the fluid and where it comes from.
The liquid released in squirting appears to come from the bladder, and some of it is urine. However, a lot of the time this fluid also includes prostate-specific antigen. This same antigen is also found in fluid released from the paraurethral glands in female ejaculation, and not in urine.
A 2007 study by Wimpissinger and colleagues found that the liquid released in squirting has a lower level of creatinine than one would expect in normal urine, meaning that the urine-like characteristics of squirting are diluted.
In a 2015 study by Salama and colleagues, ultrasound research identified that the bladder was empty at the beginning of sexual stimulation, filled up noticeably before orgasm, then emptied again.
However, other studies have identified that squirting is entirely urine. It seems to depend on methodology, and it really is incredibly difficult to research the phenomenon in a controlled setting!
Pee or not, squirting can be differentiated from coital incontinence in that it usually isn't related to stress incontinence and only happens at around orgasm.
The conflation of squirting and peeing has led to some legal decisions on censorship, most notably in the UK, which banned porn showing squirting in 2014.
The British Board of Film Classification's reason for this was that they believed based on "expert evidence" that female ejaculation and squirting didn't exist, so therefore all films depicting it were showing urinating - which was already banned in the UK.