OP just in case you're still confused (and I agree with whoever said above that it is confusing and the companies deliberately don't clarify):
On both a fixed and variable tariff you pay for each unit of energy that you use. The difference is that on a fixed tariff the cost per unit will be fixed at (say) 60p for a set period of time, say two years. And on a variable tariff the cost will be (say) 50p per unit, but that can change depending on the price cap, which is set according to the cost of energy worldwide. So you might choose to go on the fixed tariff and pay 60p and I might choose to go on the variable tariff and pay 50p, so it looks like I'm getting a better deal. But then if the price cap goes up next month I might have to pay 80p while you're still only paying 60p. It's like making a bet - if you think the price cap will go up by a lot then you're better off fixing, and if you think it will only go up by a little (or even go down) then you're better off sticking with the variable tariff.
In both cases you also pay a standing charge, which is a set amount that you pay per day on top of the unit cost, just to maintain the gas/electric supply to your house. It's currently less than £1/day for gas and electric combined so most of your bill comes from the energy you actually use.
When people say "the price cap is going up to £5000" or whatever, what they actually mean is that the 'average household' on the variable tariff is predicted to have energy bills - the usage cost plus the standing charge - of £5000 per year. You might be paying more or less than the 'average household' depending on lots of factors like the size of your house, number of people living there, how warm you keep it, whether you decide to reduce your usage because of rising costs etc. The price cap is only a cap on how much you pay per unit, the annual figure is more like a guideline to help you estimate what kind of figures you might be paying if you use a 'normal' amount of energy.
When you get a monthly bill from your energy company they estimate how much they think you'll have to pay over the whole year, based on your tariff, your previous usage habits, whether they think the unit price will go up or down (if you're on the variable tariff) and so on. Then they divide that by 12 and bill you an equal amount each month. So say they think you'll use £100 worth of energy per month in the summer and £300 in the winter, they'll send you a bill for £200 every month of the year, to make it easier for you to budget. If your actual usage is £150 per month then at the end of the year you'll be £600 in credit and they'll bill you less the next year, and if you actually use £250 then you'll be £600 in debt to them and they'll bill you more. In the end, you still pay for the amount you actually use regardless of how accurate their estimate is. That's why it's important to send regular meter readings (if you don't have a smart meter), otherwise you could end up in lots of credit or debt without realising.
So in summary, the only way to keep your costs down for certain is to reduce your usage. You might also pay less on a fixed rate compared to a variable one, but that's a guess because it depends on what happens to the energy market across the world.