Create some fake data.  Here we pretend we're taking 100 samples of some voltage at a rate of 10 samples per second.

dt=.1;
t=Table[i dt,{i,100}];
d[x_] = Sin[x]+Cos[6x];
data=Table[d[t[[i]]],{i,100}];
plotdata=Table[{t[[i]],data[[i]]},{i,50}];
ListPlot[plotdata,Joined->True, PlotRange-> All, AxesLabel->{"time (seconds)" , "amplitude (volts)"}]

We use the discrete Fourier Transform (DFT or FFT) to go into the frequency domain and the 
look at the "power spectrum".  Technically this is called the periodogram, not the power spectrum; it's an estimate of the power spectrum of some unknown underlying function that we're sampling.  For Mathematica 5.2 change Joined to PlotJoined.

fdata=Abs[Fourier[data]];
nyquist=1/(2 dt);
df=nyquist/50;
freqs=Table[i df,{i,50}];
plotfdata=Table[{freqs[[i]],fdata[[i]]},{i,50}];
ListPlot[plotfdata,Joined->True,PlotRange->All, AxesLabel->{"frequency (Hz)", power}]

Now let's make an analytic function that has the same properties as our data.  In fact, our data are samples of this function.  The tricky part here is using the "Fourier Parameters" to achieve the right interval.  In 5.2 you load Calculus`FourierTransform`

<<FourierSeries`

TimeIntervalLength = 10.;
oneoverT = 1/TimeIntervalLength;
nn = 20;
g[x_] = FourierTrigSeries[d[x],x,nn,FourierParameters->{1,oneoverT}]

p1 = Plot[g[x],{x,0,5},PlotRange->All];
p2 = Plot[d[x],{x,0,5}];
Show[p1,p2]

fourcoefs=Table[FourierCoefficient[d[x],x,i-1,FourierParameters->{1,oneoverT}],{i,1,nn+1}];
ListPlot[Abs[fourcoefs],Joined->True,PlotRange->All]

In the previous graph, the x - axis labels do not correspond to the actual frequencies, they are simply the numbers of the fourier coefficients.  You can convert them to frequencies by recognizing that the frequency interval [-fmax, fmax] is divited into a number of bins equal to the number of fourier coefficients.