What does a notary do?

What is a notary public doing when you have to get a document “notarized”? What is a notary anyway? Can’t you just “have your signature notarized” and be done with it? Turns out, there are very specific laws and regulations that determine what must be, and what must not be done in the course of…