A ledger is often defined as a book of accounts. Today a ledger is most likely an electronic record or file containing a group of accounts. For example, a company's general ledger is the record containing all of its asset, liability, owner equity, revenue, expense, gain, and loss accounts. Each of these accounts will contain the amounts that are pertinent to the account.
A trial balance is a listing of the name and the balance of each of the accounts in the general ledger. The trial balance is not a financial statement. Rather, it is an internal report that documents which accounts have debit balances and which accounts have credit balances and proves that the total of the debit balances is equal to the total of the credit balances.