Ok, I suspect you are talking about what I would call a 'cheap' spectrum analyzer. A group of LED bars. Each bar only responding to the band of frequencies it represents. The example Cliff gave is just this.
True spectrum analyzers don't work this way. I will give an example of how a spectrum that covers oh say from 1 Mhz to 1 Ghz would work.
A device like this uses the well known superheterodyne receiver scheme. I am going to assume you know the basics of RF components. The first thing that the input signal sees is a variable RF attenuator. How much it is able to attenuate is determined by the range of power that the spectrum analyzer is designed to be able to handle. Yes, power. Spectrum analyzers in the radio frequency range have an input impedance of 50 ohms and their display is calibrated in dBm. 0 dBm is 1 mWatt. The scale is a logrithmic scale. After the signal has been attenuated (or not, depending on how the user sets it) it travels through a low pass filter. The low pass filter will only pass signals from the high end (1 Ghz in this case) down. Then the signal goes into the first mixer. This is an interesting stage. You may know that a mixer has 3 ports. 2 inputs and one output. One input of the mixer is fed with the signal we have described. The other input of the mixer is fed with a swept local oscillator (LO) which is the interesting part. This LO is able to sweep a total range of about 1 Ghz since the input covers almost 0 to 1 Ghz. 'Sweep' means that the LO continously 'sweeps' through its range. The actual frequency of the LO would probably be from about 2 to 3 Ghz in this case. The third port on the mixer which is the output now has signals on it that are constantly varying in frequency because of the constantly sweeping LO. Their range would be from anywhere from 1 Ghz to 3 Ghz because of the mixing action of the mixer. The stage that this output port feeds is known as the intermediate frequency, or IF. There are often times more than one IF in a spectrum analyzer. Not in parallel but arranged in series with mixers and other local oscillators. The first IF in this case would be 2 Ghz. So, now we have frequencies coming out of the mixer from 1 to 3 Ghz, but the ONLY ones passed are the signals at 2 Ghz due to the filtering designed into the IF. This 2 Ghz signal is mixed down several more times with other stages of local oscillators and IF filtering stages. These IFs are designed to have their properties varied. By narrowing the IF so it only is several hundred hertz wide, you resolve what seems to be a band of jumbled signals into many separate signals on the display. After all the IF stages, the signal is finally detected with an AM detector. For everyone who thinks that AM is 'ancient' and of no use in todays world, guess again. After the signal is detected, it is run through a log convertor. This basically amplifies the small signals a lot and the large signals not so much. This is done because a spectrum analyzers display is read out in dB. Decibels are inherently logrithmic. Once the signal has gone through the log convertor, it is amplified linearly in order to drive the verticle deflection plates in the CRT display. The horizontal plates are driven with a ramp voltage that is synchronized with the swept local oscillator. Voila, you have a spectrum analyzer. When NO signal exists on the input, nothing exists on the output of the first mixer that will be able to pass through the IF. If there is a signal coming into the spectrum analyzer at say 500 Mhz, it will pass through the mixer and appear to be sweeping from 1.5 Ghz to 2.5 Ghz because of the mixing action of the mixer. It will pass through the IF only at ONE POINT during the sweep of the local oscillator. Do the math and you will find that point is when the first LO is at 2.5 Ghz which is in the exact middle of its range. Since the horizontal deflection of the CRT is synchronized with the sweeping first LO, can you guess where the trace will be when the detected signal appears at the verticle deflection plates? Right about in the middle, where 500 Mhz should show up. By changing the bandwidth of the IF, and only sweeping a small part of the first LO, you can narrow in on a small group of frequencies say in a range of a couple of Mhz. For instance, if you wanted to look at a group of signals in the FM broadcast band, you would tune the LO to sweep in such a way as to only let those signals through and only view a couple of Mhz of spectrum at a time. Now you may want to build the device you were talking about with a bunch of LEDs and active filtering, but I don't think you will be building the spectrum I described anytime soon. But as an engineering student, it didn't hurt you learn this little tidbit right?