When a Nintendo Game Boy is turned on, it displays a logo read from the cartridge (looking like this) before starting the game. What does it display if there's no cartridge inserted from which to read the logo? And what happens after that?
Here's a selection of Game Boys I've dug out from my drawer:
The original Game Boy displays a solid black rectangle (and a ®) which scroll down from the top of the screen, in the same way that the Nintendo logo would if a cartridge were inserted. This image remains on the screen until the Game Boy is switched off.
(Note the difference with the picture of the Game Boy Pocket in Greenonline's answer, which has a vertical break in the middle of the rectangle.)
The Game Boy Color shows a coloured animation of the phrase Game Boy in the centre of the screen, while a smaller black rectangle (with ®) is shown below the animation. Again, this remains until switched off. If a cartridge is inserted, the word "Nintendo" is displayed instead of the black rectangle, and the cartridge boots after the animation is complete.
The Game Boy Advance (and SP) display a different coloured animation of the Game Boy phrase, without a Nintendo logo. (The Nintendo logo is shown if a cartridge is present.)
Bear in mind that the GB Advance line supports network booting from another Advance or a Gamecube via link cable. When turned on without a cartridge inserted, they wait for communication with the host device, then transfer software over the link cable to execute (indicated by the Nintendo logo appearing in a non-standard, pulsing color chosen by the host device).
To complement the previous answer on why this happens, the Game Boy contains a very small ROM that is executed by the CPU before running the cartridge.
One of its routines include checking if the cartridge contains a Nintendo logo (Nintendo used this as a way of controlling game distribution by use of trademark law). Then another routine checks if the cartridge is correctly inserted (by doing a checksum of the cartridge’s rom header).
The logo shown on the screen is actually fetched from the cartridge rom (not the gameboy’s one) so if there was any problem with the cartridge header (such as not being present at all) the system will receive garbage data, manifested as scrambled graphics.
This is what a GameBoy Pocket does:
Two black blobs (and an ®) slowly descend from the top and come to rest half way down the screen.
Taken from the (somewhat interesting) video, What it looks like when you turn on a game boy without a game.
Other GameBoy versions (DMG, GBC) differ in behaviour, as Kaz's answer demonstrates.