For every individual account, a separate account is created in ledger. There are two sides of account i.e. debit and credit. Transactions are recorded accordingly.
After a period, balancing of each account is done by making the total of both sides. Excess of debit over credit is called as "Debit Balance" and excess of credit over debit is called as "credit balance".
Below is an example:
ABC Ltd.
Particulars Dr.Amount Particulars Cr.Amount
To Discount 500 By Opening Bal b/f 2000
To Cash 5000 By Purchases 10000
To Balance C/d 6500
------------ -------------
12000 12000
------------ --------------
Total of credit is Rs.12000 against debit of Rs.5500. Hence Rs.6500 is a Credit balance.