The exact cause of teratomas is not fully understood, but they are believed to originate from pluripotent germ cells, which have the potential to differentiate into various tissue types. These germ cells can undergo abnormal development, leading to the formation of teratomas. Genetic and environmental factors may also play a role in their development, though research is ongoing.