Do extra mortgage payments typically go directly towards principal?

In your title you ask what happens typically. In the body of the question you ask if you have to specify how the extra payment will be treated.

The answer is you have to ask your lender about your loan. My loan is through my credit union. I can make an extra payment anytime I want. The form on the website allows me to specify if the payment is to be treated as a regular payment (part interest and part principal), or only principal. They don't require the extra amount to be part of the regular payment on the 1st of the month. They even give me the option of making it a recurring payment (weekly, on the xth of the month, every payday...)

But that is my situation. Some may even be more flexible, some may be much less flexible. You have to ask about your situation. Check their website for a method to make the payment electronically, and see what the options are. Because you already have the mortgage you have to work with your lenders rules.

I should also add you need to make sure your loan doesn't have a pre-payment penalty.

Mortgage rules differ by country, and within a country they further differ by the lender.

Assuming this is in the US, and based on my limited experience (2 mortgages), you can only add extra payment on top of a regular payment. For example, if your regular payment is $1000, and you want to pay $500 extra, you make $1500 payment.

Regular portion of the payment covers all of the interest accrued since the last payment, and some principal on top of that. And then all of the extra goes towards principal.

Going into more details, payment form - both online, and on the paper coupon that you attach to the check - has the regular payment amount filled in, and then few more fields below, to add extra principal, extra escrow, and fees and penalties, in case they apply. That way you explicitly specify the intent of the extra payment.

Note that extra payment towards interest is impossible and makes no sense - you only owe interest accrued since the last payment, no more and no less. You cannot pay more interest than you owe, and you cannot pay less interest either. Interest payment is part of your regular payment.

These rules may differ by lender, so someone with more exposure to mortgages from different lenders may provide broader coverage on the subject.

You'll have to read your mortgage contract and/or ask the mortgage company.

Let's say you have a 30 year mortgage with fixed interest rate, and you are supposed to pay $1,000 every month. This month you pay $2,000.

One way the mortgage company can handle this (which is not very nice for you financially) is to stash the $1,000 away, and if you don't pay your $1,000 in some later month take the difference from the $1,000 they stashed away. So you can pay $500 for two months. Or they wait until the 30 years are almost over, and don't ask for the $1,000 payment of your last month, because that's already paid.

The other way, they take the extra $1,000 and subtract it from the principal. You still have $1,000 to pay every month. So now your principal is $1,000 lower. So in the next month, your interest is a bit lower, so of your $1,000 payment, more money is subtracted from the principal and so on. You finish paying your mortgage earlier than after 30 years. At least a month earlier, but probably more (and/or the last payment will not be the full $1,000).

My bank used a variation of this: They assumed that my mortgage was over 30 years, and once a year they calculated how much I would have to pay every month to finish after exactly 30 years. So once a year they changed my payments to a lower amount because I overpaid through the year. They had a direct debit taking the required amount out, I had a standing order paying extra money every month, so every time they lowered the direct debit I increased my standing order, until everything was paid off.