The short version: it skips a full month
Mortgage interest is paid in arrears. Each payment covers the month that already happened, not the month ahead. At closing, you pay "prepaid interest" for just the days left in the closing month. Then your first regular payment isn't due until the first of the second full month after closing.
Example: say you close on June 15th. You'll pay prepaid interest for the rest of June at closing, and your first full mortgage payment isn't due until August 1st, covering July. That's a month and a half or more before the first bill shows up.
Why this matters if you're currently renting
If your lease is ending in the next few months, this timing can help you avoid paying rent and a mortgage at the same time. But only if you plan the closing date right. The goal is to close on or before your lease ends, not after. Because of the payment skip, even if you close right around your move-out date, your first mortgage payment won't hit until well after the lease is over.
Working backward from your lease end date
Here's where people get caught off guard. The payment skip isn't what causes a double payment. Starting the home search too late is. A typical purchase takes 6-8 weeks from accepted offer to closing, on top of however long it takes to find the right home.
So if your lease ends in three months, you have a real window, but it isn't unlimited. I'd rather you get pre-approved and start looking seriously now than wait until six weeks are left and end up needing temporary housing or a lease extension you didn't plan on.
What I'd actually recommend
Tell me your lease end date up front. I'll help you work backward to roughly when you need to be under contract to close comfortably before then, with some buffer for surprises. Once you're under contract, confirm your exact first payment date with your loan officer too, since the timing can shift a little by lender.
Plan your timeline