It'd help to know what model specifically.
Just about any relatively new Mac has temperature-based fan control, so the fans will (usually) only ramp up to full bore if the computer is hot. Full bore, however, can be shockingly loud--many people panic when they hear it for the first time.
A kernel panic--basically a complete system crash (you'll usually see a message about holding the power button to restart in several languages)--will cause the fans to go to full speed to prevent overheating (since software control is gone), but you'd know if that's what happened.
There are also programs that can adjust the fan speed or range manually--I don't suppose you installed any recently?
I also assume you haven't added any hardware recently, but it's worth asking--if one of the temperature sensors broke or got messed up (which of course could happen even if you didn't add anything, but is rather unlikely), that might cause the fans to ramp to full speed.
Most likely, however, is that some program is running that's running the processor hard, in turn generating more heat, and thus ramping up the fans. Open up Activity Monitor (it's in the Utilities folder in the Applications folder), and see what it shows under CPU use. If one or more of the CPUs is running at 100%, that'd be a sign something is running very hard--check the list of processes (sort by the CPU column to see in order of how much they're using) and see if anything is at near or over 100%.