The price cap is set by Ofgem, the energy regulator. It limits what your supplier can charge you for each unit of gas and electricity you use, plus the daily standing charge.
It only applies to domestic default (residential homes) or standard tariffs
It does not cap your total energy bill - this amount depends on how much energy you use. The more you use the more you pay and the less you use, the less you pay.
It is linked to wholesale prices so is affected by worldwide events that could raise prices such as war and shortages of supply.
You can read more about it here Energy price cap explained | Ofgem