The cap is warm air aloft which depresses or delays thunderstorm development.
Think of it like putting a lid on a pot of boiling water.  The lid, or cap, keeps things from boiling over.  Take off the lid, or cap, and thunderstorms develop.
As the day heats up, warm updrafts begin forming.  As long as the temperatures keeps falling higher in the atmosphere, air will continue rising.
If the updraft hits a layer of warmer air it can no longer continue rising to form larger clouds or storms.
The cap, that warm aloft keeps storms at bay on a hot day.
However, if there's enough heating or if there's an area where the cap is thin or weak, the cap can be broken, allowing stronger storms to develop.
If there's no cap, storms can form, but it's more difficult for severe storms to form.  Those days are usually filled with widespread showers and storms.
It can be difficult to predict how strong the cap is on a particular day.  A temperatures difference of even 1 degree can determine if storms form or not.