Language use in the rules is inconsistent, so you need to look at context of the rule or feature in question
The language use in the core rules is not fully consistent (and this is an issue that has plagued earlier editions, too).
Contradictory uses of the term "armor"
For example, shields are listed in the "Armor" table, not the "Armor and Shields" table on p. 145, but the section in the rules is called "Armor and Shields". Moreover, the text introducing the table also mentions that "Many warriors supplement their armor with a shield", and if you supplement armor with a shield, the shield is something else but armor.
As another example, in class descriptions, shield proficiency is listed in the "armor" line of the Proficiencies section, along with armor proficiency, not in the "armor and shields" line. But there is a separate shield proficiency, in addition to light, medium and heavy armor proficiency. Does this, like the inclusion of shields in the armor table, suffice to say shields are a type of armor?
Third, and most starkly, certain class features refer to being armored and mean different things by it. Both the Monk and the Barbarian have a feature called Unarmored Defense. The monk's feature says "while you are wearing no armor and not wielding a shield", so here unarmored means without armor and shield, making someone with a shield armored; in contrast, the barbarian's says "While you are not wearing any armor", not mentioning shields, so here unarmored means only without body armor, making someone with a shield not armored.
Most of the time, armor just means armor, not shields, but to really understand if "armor" in a passage refers to just bona fide armor like plate armor, or is used in a wider sense, meaning "armor and shields", you need to look at the context in which the word is used.
In particular, one of the main sources of confusion is a passage titled Armor Proficiency (p. 144 PHB) that seems to indicate that either the term "armor" must include wearing shields, or wearing a shield without proficiency does not cause disadvantage, because the sentence about disadvantage only mentions armor, not shields:
Armor Proficiency. Anyone can put on a suit of armor or strap a shield to an arm. Only those proficient in the armor’s use know how to wear it effectively, however. If you wear armor that you lack proficiency with, you have disadvantage on any ability check, saving throw, or attack roll that involves Strength or Dexterity, and you can't cast spells. [emphasis added]
When the sentence that talks about disadvantage and only mentions armor and omits shields, does it mean only armor proper, or does it mean armor in the sense of "armor and shields"? Following our observations above, to resolve this we can look at the context, both direct and in other parts of the rules.
Direct Context: The first sentence in the paragraph talks about both armor or shields, it mentions "or strap a shield to an arm", setting context that this paragraph is about both armor and shields. Otherwise, the mentioning of shields would make no sense -- they do not show up later in the paragraph again.
Other Rules Context: The PHB says on p. 14: "There are drawbacks to wearing armor or carrying a shield if you lack the required proficiency, as explained in chapter 5." This again makes a difference between wearing armor and carrying a shield. But if only armor proper and not shields caused the drawbacks, carrying a shield without proficiency would not have a drawback, and this is in direct contradiction to this rule text.
From these it is clear that for the Armor proficiency section "armor" must mean "armor including shields" when it talks about the effect, and that is what the spellcasting rules refer to, too, when they talk about being unable to cast in armor.
Note: big sections of this are lifted from the answer here, which covers much of the same ground, but in response to a question with a slightly different context.