Start with the definition of SNR, signal power to noise power ratio.
Take an FFT of your waveform. Classify each bin as containing signal or noise. Sum the power in all the signal bins to get signal power. Sum the power in all the noise bins to get noise power. Take the ratio.
You have some choices about how you set up the FFT, and how you classify the bins around the signal frequency. Do you use a window, and if so which one, and what does it do to the signal, and what does it do to the noise?
Parseval's Theorem is very useful here in getting one's ideas straight. Obviously a synchronously sampled signal that allows you to avoid a window and still convert without aliasing is the simplest situation to understand first.
MATLAB is very handy for this sort of task, as you can generate known signals with known noise additions, analyse them, and check you get the answer you expected. Hint, seeing noise on a graph is rather easier than understanding exactly what the noise measurements mean quantitively. It's worth comparing with MATLAB's SNR function, but you'll need to understand exactly what choices it is making for the signal classification.