Closing journal entries are made at the end of an accounting period to prepare temporary accounts for the next period.
This is becaues temporary or nominal accounts, (also called income statement accounts), are measured periodically; and so, the amounts in one accounting period should be closed or brought to zero so that they won't get mixed with those of the next period.
Temporary accounts consist of all revenue and expense accounts, and also withdrawal accounts of owner/s in the case of sole proprietorships and partnerships. Take note that closing entries are prepared only for temporary accounts. Permanent accounts are never closed.
Four Steps in Preparing Closing Entries
Close all revenue accounts to Income Summary
Close all expense accounts to Income Summary
Close Income Summary to the appropriate capital account
Close withdrawals to the capital account/s (this step is for sole proprietorship and partnership only)

The purpose of closing entries is to prepare the temporary accounts for the next accounting period. In other words, the income and expense accounts are "restarted".

