Warlocks are a bit different from other classes, so it's fair that it can seem confusing at first!
These are the number of cantrips your Warlock knows. Cantrips do not cost Spell Slots and can be used almost every turn.
These are the total number of spells known for the Warlock at the proposed level. When a warlock wants to spend a Spell Slot to cast a spell, they have to choose from the spells they have Known.
Keep in mind, this is separate from Cantrips Known.
This is how many non-cantrip spells a Warlock can cast per Short Rest. Once you take a Short Rest, you get all of these back.
This is how big your slots are. All of your Spell Slots for a Warlock are cast at this level. In DnD 5th edition, many spells can be "upcasted" (casting them at a higher level than is required) for additional benefits. A spell like Hex (Level 1 spell) has additional benefits when you cast it with a spell slot that's larger than level 1, which will happen often as a Warlock.
Invocations are different from spells. These are special permanent benefits you choose for the Warlock, in its own section of the Warlock class. Example invocations include being able to knock enemies back with the Eldritch Blast cantrip, being able to see in magical and nonmagical darkness, and being able to turn invisible.
An example scenario could be a level 5 Warlock. They would have:
- 3 cantrips known
- 6 Non-cantrip spells known to choose from
- 2 Spell Slots (Can cast non-cantrip spells twice per short rest)
- 3rd level spell slots (Casts those non-cantrip spells as level 3)
Another way you can look at it is that this Warlock has two level 3 spell slots, and regenerates those two spell slots each short or long rest.
Warlocks lack versatility in that they do not have many options for what to cast and how often to cast them compared to other casters (the Wizard can cast a total of 9 spells at level 5, and can cast all of them in a minute) but the spells that Warlocks DO cast are at very high levels. Note that a level 5 Wizard can only cast level 3 spells twice per long rest, where the Warlock can cast that many per short rest.
Assuming there are two short rests per long rest, that means that the Warlock can cast their highest powered spells 3x more than the Wizard.
A Wizard may excel in versatility, but nothing compares to the Warlock in raw, consistent firepower.