Per IRS Publication 936 Home Mortgage Interest Deduction, on page 4:
For you to take a home mortgage interest deduction, your debt must be secured by a qualified home. This means your main home or your second home. A home includes a house, condominium, cooperative, mobile home, house trailer, boat, or similar property that has sleeping, cooking, and toilet facilities.
The interest you pay on a mortgage on a home other than your main or second home may be deductible if the proceeds of the loan were used for business, investment, or other deductible purposes. Otherwise, it is considered personal interest and isn't deductible.
Main home. You can have only one main home at any one time. This is the home where you ordinarily live most of the time.
Second home. A second home is a home that you choose to treat as your second home.
Second home not rented out. If you have a second home that you don’t hold out for rent or resale to others at any time during the year, you can treat it as a qualified home. You don't have to use the home during the year.
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the document at the time it is accessed.