They were movements within Judaism. You can roughly compare them to Orthodox Chrisians v. Catholics v. Protestants, or Sunni Muslims v. Shi’ites. There wee other movements, such as Essenes (from which Christians probably evolved, abandining circumcision, dietary laws, etc).
Very roughly speaking, the p’s placed more emphasis on following the rules (e.g., not working on Sabbath, not eating pork) and the s’s placed more emphasis on studying the theory. Following the Diaspora, the p’s aborbed the s’s, and today all Jews (Orthodox, Conservative, Reform, whatever) descend from the p’s.
The Pharisees were followers of Talmudic/Rabbinic Judaism as we know it today (the Orthodox flavor). The name derives from the Hebrew word “Perush” which means to separate (i.e., from worldly pleasures, something the Saducees did not do, since they denied the afterlife).
The Saducees were a heretical sect which denied the divinity of the oral tradition and the concept of afterlife reward and punishment. They attained some political power through manipulation of the priesthood during the Second Temple era, but pretty much vanished/assimilated after the Temple’s destruction. The name derives from “Zadok”, the name of the founder of the sect.
“Sherlock Holmes once said that once you have eliminated the
impossible, whatever remains, however improbable, must be
the answer. I, however, do not like to eliminate the impossible.
The impossible often has a kind of integrity to it that the merely improbable lacks.”
– Douglas Adams’s Dirk Gently, Holistic Detective
This was asked and answered in some length just a few weeks ago, under separate threads for Pharisees, Sadducees, and Essenes. Try searching; when that doesn’t work, ask for all posts in the last 3 months or so, and just run down the line, you’ll find 'em.