Cholesterol is an organic molecule. It is a sterol (or modified steroid), a lipid molecule and is biosynthesized by all animal cells because it is an essential structural component of all animal (not plant or bacterial) cell membranes that is required to maintain both membrane structural integrity and fluidity.
Cholesterol enables animal cells to not need a cell wall (like plants and bacteria) to protect membrane integrity and cell viability, thus are able to change shape and move about (unlike bacteria and plant cells which are restricted by their cell walls).
In addition to its importance within cells, cholesterol also serves as a precursor for the biosynthesis of steroid hormones, bile acids, and vitamin D. Cholesterol is the principal sterol synthesized by animals. All kinds of cells in animals can produce it.
In vertebrates the hepatic cells typically produce greater amounts than other cells. It is almost completely absent among prokaryotes (bacteria and archaea), although there are some exceptions such as Mycoplasma, which require cholesterol for growth.