There are two types of deadlines when you're mailing a form, like a voter registration form or your mail-in ballot itself, to your local election office.
With “postmarked by"
Your form will be counted as long as you put it in the mail by your state’s deadline, as long as it still arrives before the state's cutoff date.
So if your ballot must be "postmarked by" November 3, you can put it in the mail on November 3 and it will be counted even though it's received after that date.
But states have cutoffs. For example, in Wisconsin ballots will be counted up to 6 days after Election Day. In Pennsylvania, your ballot will be counted if it arrives up to 3 days later.
Since you have no control over how long it takes for your ballot to get through the mail, don't wait until Election Day to mail it (even if, technically, you can.)
With “received by,”
The form must get through the mail and get to your local election office by that deadline. So if your ballot must be "received by" November 3, you need to mail it early enough to actually get there by November 3—or it won't be counted.
If your state’s deadline is “received by,” mail it back early to avoid risking missing the deadline. The USPS is recommending at least a week. If you're less than a week until a "received by" deadline, choose an in-person drop-off option instead.