If you pay your mortgage later than the due date but before the end of the month then nothing will usually happen except maybe a late fee charge for the late mortgage payment.
You usually have a full 30 days to make the mortgage payment before the bank reports the mortgage payment as late.
Then if you miss around 3 or 4 mortgage payments the bank will usually begin to start the foreclosure process but usually you can still get the house out of foreclosure if you can make the payments in full.
But being late on the mortgage payment every now and then should not cause foreclosure except for maybe late fees.