How do you remove icons from the Menu bar?
It depends which icons you are trying to remove. There are two types; software that uses the NSStatusItem API that Apple publicise for third party developers and software that uses their private undocumented NSMenuExta API.

The icons that represent operating system features can be removed by holding down the cmd &#8984; key and dragging them with the mouse. For example, the AirPlay, Time Machine, Bluetooth and Wi-Fi icons. These are implemented using NSMenuExtra.

Other icons, the ones that represent applications you may need to close the application to remove. For example, Dropbox and Plex. Apple provide NSStatusItem for developers to implement them, but unfortunately it doesn't provide all the features of NSMenuExtra, for example dragging to uninstall is only available through NSMenuExtra.