Karl Benz is considered the inventor of the first car. His car that he invented in 1885 was the first automobile with an internal combustion engine
that ran on gasoline, like the cars we use today.
Earlier than this some other vehicles were invented that could be considered cars.
Nicolas-Joseph Cugnot built a three-wheeled steam-powered tractor in 1769.
Robert Anderson built a crude electric carriage in the 1830's. But neither of these
inventions worked very well. The first practical electrical car was created in 1891
and as for steam carriages, they turned out to be more effective as trains.