The difference between history and prehistory can be summarised in a word. Writing allowed people to keep records of what happened and when. It meant they could pass on stories to other generations. With writing came the beginning of what is called "recorded" history. Everything before is "pre-history", or prehistoric.
Recorded human history really begins at the same time as writing first appears – and that happened in the earliest human civilisations of the Middle East, about 5,000 years ago, which takes us to within one 10th of a second to midnight on the 24-hour clock of Earth history.
No one knows who actually invented writing. It is highly unlikely that any one person did. People may have begun to experiment with the first scratches and scribbles as much as 10,000 years ago as a way of keeping track of the cycles of the Moon and stars. However, it was only about 5,000 years ago that the first clear use of written symbols by a settled civilisation appears, initially as a way of keeping commercial records and accounts.
Merchants of the Middle East drew simple pictures on clay tablets to identify particular goods. Next to them they scraped counting marks to show a quantity. These tablets were baked in ovens to make their marks permanent, creating an unchangeable set of records showing exactly who had received what goods. Writing helped people manage their accounts of trade and exchange.
But making drawings on clay was a time-consuming and laborious business. It made more sense to come up with a shorthand code to speed the process up. Over time, wedge-shaped strokes replaced the pictures because they were easier and quicker to mark onto the tablets. These strokes were made using a kind of pen made out of reed in the shape of a modern-day cutting knife. This style of writing is called cuneiform and it forms the basis for three of the oldest written languages in the world: Sumerian, Assyrian and Babylonian.