What you are asking about is what's known as a "Creation Myth". The Judeo-Christian story from the Bible is an example. There are many stories that date much further back, however.
As soon as man's brain was developed enough to wonder about his existence, he wondered 'why am I here' (and the answer was God) and wondered 'how did I get here?' and the creation myths are the answer to that question.
There are literally hundreds of documented creation myths, and you can find a bunch of them on Wikipedia:
Edit: The link, while looking normal, actually links you to the exact page!
Hope this helps!