Since the Otto engine looks kinda simple (almost want to say boring) I thought I'd add couple of pictures of the cars from the first decade of the 20th century.
When it comes to history of internal combustion engine it's good to have a stopping point. You can go back all the way to 300BC and the invention of crank and rod mechanism. However, let's start with a book which laid out ideas that are still present in our engines: "A Method for Rising Inflammable Air for the Purposes of Producing Motion and Facilitating Metallurgical Operations". 3 years later in 1794 the concepts in this book were being put to use. Same year the gasoline, almost useless by-product of oil at the time, was used to power the explosion in the cylinder. 1801 saw a use of compression in a gas engine. The electric spark was added in 1807 to ignite the mixture in the engine which used the same principle as a toy gun from 1780. These incremental improvements kept adding up every decade until Jean Lenoir built the first reliable engine in 1860. It was the first engine to be produced commercially (although it sold only 700, similar to the first car) and it kinda worked if you cooled it properly. Lenoir ambitiously put his engine in a carriage about a year later. The engine kept overheating and seizing up and barely moved the carriage (which wasn't surprising since it only made 0.88 hp). Lenoir copied a lot of the ideas for his engine from steam engines so tech was not super compatible. While Lenoir was trying to figure out how to make a reliable car, Nikolaus Otto built a replica of Lenoir's engine in 1861. He wasn't even 30. He spent most of his 30s trying to figure out how he could improve on Lenoir's design. He did it several times. First time was in 1864, then in 1867 he received an award at World's Fair in Paris for building an engine that was more than twice as efficient as Lenoir's. 9 years later Otto with the designer Wilhelm Maybach and engineer Gottlieb Daimler patented a compressed charge, four stroke engine aka Otto Cycle engine or Otto Engine.