Hi Mika.m!
I'll answer your questions, but we should discuss some terminology first. You've mentioned the 'female' body and 'women'- such words are often used as shorthands to refer to certain kinds of body parts- in this case, anatomy like a vulva or vagina. But we should remember that not everyone with those body parts is a woman and that not all women have a vulva or vagina. Does this make sense?
Okay, the way orgasms work in the bodies of people who have vulvas is not all that different than the way they work in the bodies of people with penises. For everyone, orgasms are a peak or heightened state of sexual excitement. People tend to experience an increase in muscle tension and relaxation, along with the release of chemicals like endorphins. Here is the difference: orgasms in people with penises are often but not always accompanied by ejaculation, but orgasms for those with a vagina are not tied to ejaculation in the same way.
Squirting is sometimes known as 'female' ejaculation. The liquid in squirting comes from the paraurethral or Skene's glands, through the urethra. The composition of this fluid is a subject of ongoing research, but it seems to be different from urine.
Not all people with vaginas squirt and those who can do not do it all the time. As I mentioned, squirting does not have to accompany orgasm- it is possible, but it can also happen before or after. Why do some people squirt and others don't? I think it is because that is just how their bodies are.
You can read more about orgasms and the rest of the sexual response cycle
here, and you can read more about squirting
here.