I'm not sure where the "not interest" part of your quoted statement comes from; that's not the way this advice is normally given. Perhaps you worded the statement that way because you think there are only two possibilities: payments either are applied to the principal or to the interest? If so, there's a misunderstanding here.

Here are two other possibilities: (1) the mortgage holder puts the extra payments in escrow/holding, to be used in the future should you fail to make a payment; (2) the mortgage holder records the payment as being made in advance, without giving you any benefit (such as reduced interest). (Another way of thinking of this is that the mortgage holder moves up the due date, essentially giving you credit for having made the final payment. Unfortunately, this isn't just theoretical.) 

In short, "applied to principal" is a shorthand way of saying that the mortgage holder treats the extra payment in a particular way (which benefits you the most), and not in a way (see (1) and (2), above) that benefits the mortgage holder the most.

Why making additional payment to mortgage counts towards principal? Why does it matter?
I have found it very challenging to write a Python script to post ads to Facebook in Python. In particular, I want to post ads that show up in mobile news feeds. Can you provide boilerplate code to post one ad, that I can expand on?

My goal is to write a fuller Python script post thousands of ads to Facebook. Most parts of the ads are the same, but they vary base on gender, interest, or device in some specific way.
