Unless you have a smart meter, or you provide your supplier with monthly meter readings, there is some level of estimation included in your energy billing. This can result in your account being in debit or credit, depending if your supplier has been under or over-estimating your level of energy use.
If your account is in credit and you switch away, the credit balance should be refunded automatically within 21 days of having been issued a final bill.
What happens if I still haven't received my credit?
If you find that your energy account is in still in credit, you should write to you supplier to ensure that they refund this back to you.