Here are a few guidelines:
The first word of any sentence is normally always capitalized. Regardless of whether or not the would otherwise be capitalized, it is capitalized if the sentence starts with it.
You generally always capitalize every part of a proper noun. (Some people or organizations might use different styling in the use of their own proper nouns. But some words within a proper noun not being capitalized would be a case-by-case exception.)
When you use title caps, every word in the title is capitalized except for articles and some prepositions that are not part of proper nouns. The specific rules vary from one style guide to another.
Any word not capitalized because of the first three guidelines would normally be in lowercase.
Particular styling for the sake of unique presentation can always change any of these guidelines.
Here are some examples:
- It's true that President Trump is the president of the United States.
- The United States is made up of united states.
- The book The Drama Triangle talks about drama, triangles, and a particular drama triangle that's known as The Drama Triangle. It discusses the reasons why the drama triangle to be given this special status is so complicated.
- Bruce Springsteen is known as The Boss. Whenever The Boss comes to town, the boss of my company takes us out to see him.
From the official White House website (emphasis mine):
Every president since John Adams has occupied the White House, and the history of this building extends far beyond the construction of its walls.
Note the capitalization. Although most sentences on the website start with the phrase The White House, so it appears as if the article is part of the proper noun, in this sentence it's clear that it isn't—the article is only capitalized when it appeared as the first word in a sentence. As in this sentence, when it is not used at the start, it becomes clear that the proper name of the building is White House, not The White House—even though we add a the in front of it anyway for the sake of grammar.
However, this is arbitrary. Those people who coined the name of the white house might have chosen to name it The White House instead, making the article part of its actual name. In that case, it would appear with a capital The in the middle of sentences as well.
This follows my example of Bruce Springsteen. His nickname isn't Boss, it's actually (deliberately) The Boss.
Note that sometimes what sounds natural can supersede what is technically correct from a syntactical point of view.
✔ Those are the Gucci shoes I was talking about.
Here, we have a proper noun acting to modify a common noun.
But while the next sentence follows the same syntactical rule, it doesn't look right:
？ That is the The Boss ticket I was talking about.
Even though the second article is not actually an article per se (it's part of a name), it's not possible to look at the duplication and think it's appropriate. If something is technically correct, but is still incredibly awkward, it's better to rephrase it.
In this case, we could omit one or the other word (knowing the meaning would be understood anyway) or we could actually restructure the sentence so it's not awkward to start with:
✔ That is the ticket to The Boss I was talking about.
✔ That is
the The Boss ticket I was talking about.
✔ That is the
The Boss ticket I was talking about.
In the last two sentences, we know perfectly well which words should be capitalized—it's just that we're choosing to omit one or the other for the sake of comprehension. (And which we omit would be a matter of style or personal choice.)