What’s the best way to alert someone to an error on their form?

When someone submits a form on a Website or mobile app that has an error, what's the best place to show them the error? Should it be by the submit button or by the errant field? If it's by the errant field, should that field zoom into focus?