Normally you have 3-5 days after the due date to make the payment otherwise the payment would be considered late and late fees would be applied. (this will be specified in your mortgage contract) they can’t take legal action unless your 30+ days late and this varies from state to state.
If the bank receives more than what is owed during any billing period it’s applied to the principal (you can’t prepay for the following billing period)