If you buy one of many new makes and models of car today, you might be surprised to find that, as a standard feature, it can do something your previous car couldn’t: It will take over when it thinks you’re making a mistake.

In the coming years, many cars will do more than that, even driving mostly by themselves, at least on highways. And not just luxury models such as the latest Audi A8 or Cadillac CT6, but something as mainstream as a Nissan Rogue.

Some...