Explanation
I've always found the Fourier function in Mathematica to be a bit lacking and non-intuitive. Like you seem to imply, a function which would take time-domain data in the form u={{t1,y1},{t2,y2},...}
and return frequency domain data of the form v={{f1,Y1},{f2,Y2},...{fmax,Yn}}
would be much more useful in many cases. So I've gone ahead and written my own that can simply be used as follows:
DiscreteFourier[u,fmax] (*Code provided at bottom of this answer*)
Here u is the list containing your time-domain points and fmax is the maximum frequency you want the output list to go up to.
Examples
For example, to compute the fourier transform of the function $\sin\left( 2\pi 5 t\right)$ from sampled data we could do something like this:
data = Table[{t, Sin[2 \[Pi] 5 t]}, {t, 0, 5, 0.001}];
ft = DiscreteFourier[data, 20];
ListPlot[ft /. c_Complex :> Abs[c], PlotRange -> All]
Which produces the following output

Additionally, if you have data that isn't sampled at a constant sample rate, the function will automatically detect it and re-scale it using interpolation like this:
data = Table[{t, Sin[2 \[Pi] 5 t]}, {t, RandomReal[{0, 5}, 5/0.001]}];
ft = DiscreteFourier[data, 20];
ListPlot[ft /. c_Complex :> Abs[c], PlotRange -> All]

Notice, however, that when the samples aren't evenly spaced you loose resolution in the frequency domain, despite having the same number of samples as the first example.
Code
Clear[DiscreteFourier];
DiscreteFourier[pts_, fmax_, opts:OptionsPattern[]] := Module[{\[Omega]max, pt, \[CapitalDelta]ts, \[CapitalDelta]t, u, n, b, \[Omega], ifun},
\[Omega]max = 2*Pi*fmax;
pt = SortBy[pts, First];
pt = pt /. {t_ /; !ListQ[t], x_ /; !ListQ[x]} :> {t - pts[[1]][[1]], x}; n = Length[pts];
\[CapitalDelta]ts = Transpose[pt][[1]][[2 ;; -1]] - Transpose[pt][[1]][[1 ;; -2]] /. t_NumberQ :> 0.0002; \[CapitalDelta]t = Mean[\[CapitalDelta]ts];
If[Max[\[CapitalDelta]ts - \[CapitalDelta]t] > OptionValue[Tolerance],
ifun = Interpolation[pt, InterpolationOrder -> OptionValue[InterpolationOrder]];
pt = Table[{((r - 1)/(n - 1))*pt[[-1]][[1]], ifun[((r - 1)/(n - 1))*pt[[-1]][[1]]]}, {r, 1, n}];
Message[DiscreteFourier::Rescale];
];
u = Switch[OptionValue[Method],
"LeftRiemann",
Table[pt[[r]][[2]]*\[CapitalDelta]t, {r, 1, n - 1}],
"RightRiemann",
Table[pt[[r + 1]][[2]]*\[CapitalDelta]t, {r, 1, n - 1}],
"Trapezoidal",
Table[((pt[[r + 1]][[2]] + pt[[r]][[2]])/2)*\[CapitalDelta]t, {r, 1, n - 1}],
_,
Message[DiscreteFourier::InvalidMethod, OptionValue[Method]];
Abort[];
];
b = (\[Omega]max*pt[[-1]][[1]]*n)/(2*Pi*(n - 1)^2);
v = Fourier[u, FourierParameters -> {1, b}];
Table[{(1/(2*Pi))*((s - 1)/(n - 1))*\[Omega]max, v[[s]]}, {s, 1, n - 1}]
]
DiscreteFourier::InvalidMethod = "`1` is not a valid method";
DiscreteFourier::Rescale = "The provided datapoints are not evenly spaced and so interpolation will be used to re-sample them at a constant sample rate. Note that this can introduce considerable error in some cases.";
Options[DiscreteFourier] = {Method -> "Trapezoidal", Tolerance -> 10^(-10), InterpolationOrder -> 1};
Code explained
First the function takes the data points and sorts them and shifts them so that they run from t=0 to tmax. Then it checks to see if the data points are evenly spaced in time by seeing if the difference between any 2 consecutive points is more than Tolerance away from the mean of all the other consecutive points. If the data is not evenly spaced it will use an interpolating function to re-sample them as even spacing is necessary for the FFT algorithm to work. I could probably get around this by using SparseArrays, but that's work for a future date. Anyway, after we have evenly spaced data, the function then re-arranges the points into a list u and a parameter b which are fed into Mathematica's Fourier function. Both u and b are found so that the summation preformed by Fourier[]
mimics a Riemann sum. The specific type of Riemann sum being used can also be specified using Method->"Trapezoidal"
, Method->"LeftRiemann"
or Method->"RightRiemann"
. Finally, we rescale the output of Fourier[]
so that it returns a list of points of the form {f,Y(f)} where f is a frequency and Y(f) is the Fourier transform of the signal at that frequency.