Allow me to add some clarity to the other answers you may or may not be getting.
You asked how and why the second bullet point in War Caster works, asking if; WITHOUT the feat, you could cast spells in certain situations.
When Wielding a sword and shield?
Only with spells that have JUST verbal components
(unless you are a Cleric or Paladin using a Holy Symbol, which can be emblazoned upon a shield or worn around the neck)
Here's why: PHB pg 203 breaks down what each Component of a spell; that is, Verbal, Somatic, and Material; means and what happens if you can't provide each required component of any spell you wish to cast.
"...if you can't provide one or more of a spell's components, you are unable to cast the spell..."
Somatic: "...if a spell requires a somatic component, the caster must have free use of at least one hand to perform these gestures ..."
Material: "...A ...caster must have a hand free to access these components (either a Spellcasting Focus, A Component Pouch, or the individual material requirements) ...but it can be the same hand used to perform Somatic components."
Verbal: "...the chanting of mystical words....a character who is gagged or in an area of silence (otherwise unable to speak), can't cast a spell with a verbal component..."
If any spell that you cast while holding both a shield and a sword, meaning both of your hands are occupied by an item that is NOT your spellcasting focus, then you have no hands free to use Somatic or Material components and those spells can not be cast. Having both hands occupied does nothing to impede you from casting spells that only have Verbal components however.
Wielding a 2 handed Weapon like a Greatsword
Not by rules as written if the 2 Handed weapon is not Versatile
A greatsword is a 2 handed weapon and, despite the argument about being able to 'let go of it for a moment and hold it with one hand', it is unfortunately not also a 'Versatile' weapon, which allows for wielding in one or two hands as desired. PHB page 147 explains that 2 handed weapons (that are not versatile) require 2 hands to use when making attacks.
These 2 (perhaps not entirely clear to some people) rulings make having the War Caster feat actually mean something, or else the feat would not be written with the very particular language it is written with. If you COULD cast a spell while wielding a weapon in 2 hands or having a weapon and a shield in both hands, the 2nd bullet point of this feat would be useless and void. They did not make this bullet point useless and void by allowing you to 'take a hand off of' a 2 handed weapon for spellcasting purposes.
Argument: Errata made a point of emphasizing that you don't need 2 hands for a 2 handed weapon 'while you simply hold it' , leading to some speculation that during combat it is perfectly fine to 'simply hold it' with one hand to cast a spell...even though this would change everything and make the 2nd bullet point in the feat useless and void, which we already know Wizards of the Coast didn't and wouldn't do. An argument can be made for the other side that the Errata wouldn't go out of its way to spell it out like this if it couldn't be used, and so it goes, back and forth, until someone over there clarifies. In this case use whichever side of the argument you feel is correct.