The role of the master browser is to maintain a browse list of computers that are acting as SMB servers.
How is a master browser chosen? It gets elected through quite an elaborate election process.
How is the master browse list populated? In a nutshell, computers announce their presence through lossy, non-routable broadcasts every 12 minutes. The master browser uses these broadcasts to populate the master browse list. The interaction between SMB servers and the master browser is limited to announcing when they join or leave the network and requesting a list of backup browsers.
What is a backup browser? A backup browser maintains a copy of the browse list and responds to client requests for it. In a workgroup of fewer than 32 computers, there will be one backup browser. Backup browsers have their browse lists updated from the master browser every 12 minutes. (Note: Samba and Microsoft documentation differ on this point. Samba documentation suggests the interval is 15 minutes).
How are computers removed from the browse list? The master browser removes a computer’s entry from the browse list if a computer announces it is leaving or if it misses three announcements in a row. If the latter occurs, as it will if a computer crashes or is shut down inelegantly, ghosted entries remain in the master browse list for 36 minutes! As the backup browser list may not be updated for a further 12 minutes, it may take up to 48 minutes for computers on the local subnet to be informed of a failed SMB server. Note that the time is halved to 24 minutes if the SMB server announces it is leaving instead of bombing out.
It now becomes clear why network discovery is so unreliable. It can take a considerable amount of time to populate a stable browse list.