Whilst there is considerable variation in the biology of the various life forms encountered by the Federation, many of them are founded on surprisingly similar basic biology. In 2369 Professor Galen's work led to the discovery that this similarity was the result of a common origin from many of the species in the galaxy in the form of the Progenitors. The Progenitors seeded DNA codes onto many worlds, directing evolution to produce creatures somewhat similar to themselves. As a result, these species are all based on compatible DNA molecules.1
One of the properties of such lifeforms is that almost every cell in the body contains a DNA "map" of the entire body - so for example a single nerve cell contains instructions for making bones, fingers, skin, etc. With sufficient technology it is possible to take a single cell and force it to begin replicating itself, ultimately creating a physical copy of the original organism in a process known as cloning.
The present state of the technology forbids creating an absolutely perfect copy via cloning; there is always some small degree of error in the replication process, a phenomena known as replicative fading. In 2365 the Enterprise-D encountered the planet Mariposa, whose society had developed from a crashed spacecraft with only five surviving crew. The survivors had resorted to cloning to boost their numbers, and it had become their standard method of reproduction. Unfortunately by the time of the Enterpise's visit, the replicative fading effect had progressed to the point where the entire Mariposan society was facing imminent destruction.2
In the 2360s the Romulans embarked on a project to replace certain key Federation officer with clones, most notably Jean Luc Picard. The project was ultimately abandoned, though Picard's clone was indeed created. With the cancellation of the project he was sent to live in the slave mines on Remus.3
On Deep Space Nine, a criminal named Ibudan created and murdered a clone of himself as part of an attempt to frame Constable Odo for murder. He hoped that the lack of any other DNA at the crime scene would implicate the Changeling. The plan was unsuccessful, and Ibudan was charged with the murder.4
In 2369 the Klingon monks at the Boreth monastery created a clone of Kahless in an attempt to fool people into believing that the original Kahless had returned. The plot was uncovered, but Chancellor Gowron agreed to allow the clone to assume the symbolic title of Emperor as a unifying force within the Empire.5
Perhaps the most widespread use of cloning is amongst the Dominion; the Founders use cloning to produce all of their Vorta and Jem'Hadar servants. This is especially so in the case of the Jem'Hadar, where cloning can be used to produce vast numbers in a short period.6