For example you could do this with a Courier IMAP server by setting IMAP_CHECK_ALL_FOLDERS=1 and IMAP_ENHANCEDIDLE=1 in the IMAPD file and installing the File Alteration Monitor (FAM) package. If you are the admin for the IMAP server you may be able to configure it to check for new mail in all folders and notify the email client using the IDLE command. Set _all_folders_for_new to true instead to make it effective for all accounts using the Config Editor. However, that setting was replaced in version 5.0 with server-specific ones. The downside was there is no way to exclude a specific folder (such as a junk mail folder).
If you need to do this for many folders, either install the FolderCheck addon (it adds 'Check this folder for new messages' to the folders context menu), or do the following. Right-click on remote folder, select Properties, and check the box for 'Check this folder for new messages'.
There are two ways to do this but adding more folders may affect Thunderbird and/or server performance: But you can configure Thunderbird to automatically check for new messages in other folders. Thunderbird only checks the Inbox for new mail in IMAP accounts by default.