There is a dark grey folder icon with a question mark in the middle that keeps flashing in the middle of the screen.
Hello psychedelic!
For some reason, your Mac is unable to recognize its startup disk, and the "Startup Disk" System Preference needs to be reset. Since you can not now access System Preferences to reset that preference, you'll have to reset it by doing the following.
While the question mark is flashing, insert "Install Disc 1" of the currently installed OS (Tiger disc if Tiger installed; Leopard disc if Leopard installed - don't mix up the use of these discs) into the optical drive. Within a minute or two, your Mac should recognize the disc as a startup disk, and should boot to it.
If it does not, press the power button until your Mac shuts down hard. Then startup your Mac and immediately after hearing the startup chime press down the "c" key until you see the spinning progress indicator beneath the Apple logo, then release the "c" key.
Once you see the first screen of the installer, the language selection screen, select your language and continue to the next screen where at the top you'll see a menu bar with various pull-down menus, one of which is "Utilities."
Open "Utilities" and select "Startup Disk." Once it opens it will scan for all available startup disks, one of which will be the disc that you inserted into the optical drive. If another disk is shown, that should be the internal HDD named with your installed OS X version on it. Select that disk and then select "Shut down" from the "Startup Disk" menu. Your Mac will shut down.
When you next startup your Mac it should startup as normal. Eject "Install Disc 1" from the optical drive. Check the rest of System Preferences to see if any other settings were also unexpectedly reset.
If "Startup Disk" does not find your usual HDD when it scans, Quit from the menu. Return to the "Utilities" menu and open "Disk Utility" to see if it can find your internal HDD. If not, select "Quit" in the menu, Quit the Installer, and click the "Restart" button.
Immediately after hearing the startup chime, hold down the "d" key until you see the spinning progress indicator beneath the Apple logo, then release the "d" key. Your Mac will now startup to the Apple Hardware Test. Run the "Extended" version of the AHT and write down the error message. Call AppleCare and report the message to get your Mac repaired under warranty.
If there is an error message, you probably have a failed hard drive. If you have important data that you failed to backup, the best chance you have to save it is to immediately copy it from your Mac to another computer using FireWire target disc mode, with the problem Mac as the "target." Refer to the following Apple Support article:
How to use FireWire target disk mode