There's no single answer to the question of "the first car". It depends on how you define "car". There wasn't a sudden invention; it was a gradual evolution.
However, some strong contenders for early automobiles include Karl Benz's Benz Patent-Motorwagen (1886) which is often cited as the first practical automobile. Others might argue for different early vehicles depending on their definition of "car".