A trial balance is prepared to test the arithmetical accuracy of ledger entries. It is a statement that lists all the ledger accounts and their balances, either debit or credit, to verify that the total of all debits equals the total of all credits. If the totals do not match, it indicates that there is an error in the ledger entries, which needs to be corrected. The trial balance does not detect fraud or determine opening capital, but it helps to identify errors in the accounting process and ensure that the financial statements are accurate.