Set theory is the study of well-defined collections (called sets) considered as abstract objects with a binary extensional relation (set membership) defined on them. So-called naïve set-theory is concerned with the operations of set union, intersection, and difference, and is very helpful for understanding the nature of numbers (which are always understood by mathematicians as elements of some set) and therefore also arithmetic and algebra. More advanced topics in mathematics such as analysis and topology require a much more sophisticated use of set theory.
Abstract set theory is concerned with pure sets, whose only elements are other sets. Formal set theory is the theory of a system of axioms such as the Zermelo-Fränkel axioms, the Godel-Bernays axioms, or Quine’s New Foundations.