The general form a sample sinusoid function is
$$sin \left( 2\pi f t + \phi \right)$$where
Another common form is $$sin \left( \omega t + \phi \right)$$
where $\omega$ is the angular frequency and $\omega = 2 \pi f$
The period of a signal ($T$) is in reciprocal of the frequency
$$ T = \frac{1}{f} $$Frequency is the number of cycles per unit time. Period is the amout of time for one cycle to complete.
There are two main ideas behind frequency analysis:
Note: spectral density of white noise if constant with an amplitude of one, meaning that all frequencies are unifformly present in white noise.
A function $f$ is periodic if and only if $p$ is the smallest value such that $f(x) = f(x + k p)$ for all x and integers k. If no value $p$ exists, the $f$ is aperiodic.
Real signals may be psuedo-periodic having a similar shape that repeats in a consistent cycle.
Signals can be transformed into the frequence domain with a Fourier Series (periodic signals) or a Fourier Transform (aperiodic signals). Periodic signals can be directly transformed into the frequency domain by decomposition into a Fourier series because sine and cosine form a basis for the subspace of period functions. Aperiodic functions must be transformed with the Fourier transfrom, which can be used for any general aperiodic function.
Spectral density is given by
$$ S_x \left( f \right) = 1 + 2 \sum^\infty_{k=1} \rho_k cos \left( 2 \pi f k \right) $$The estimated sample spectral density is limited by the number of sample autocorrelations that can be estimated, exactly $N-1$ autocorrelations.
The estimate of $S_x \left( f \right)$ is given by
$$ \hat{S}_x \left( f \right) = 1 + 2 \sum^{N-1}_{k=1} \hat{\rho}_k cos \left( 2 \pi f k \right) $$However, because the later (high $k$) sample autocorrelations are low quality (estimated with a small number of samples) the sample spectral density components are "smoothed" with a window function to minimize the impact from low quality autocorrelations and the spectrum estimate is commonly truncated at $M < N-1$. A window function is represented by $\lambda_k$, decreasing in magnitude with increasing $k$.
The including window smoothing, the sample spectral density becomes
$$ \hat{S}_x \left( f \right) = \lambda_0 + 2 \sum^{N-1}_{k=1} \lambda_k cos \left( 2 \pi f k \right) $$where $\lambda$ is a window function and $M$ is a truncation value (commonly $M = 2 \sqrt{N}$).
The quality of autocorrelations is consider to decrease as the index $k$ increases. This is because the number of data points used to estimate the autocorrelation decreases incrementally as $k$ increases. At maximum $k$, the autocorrelation is estimated by one cross product $\left( x_t - \bar{x} \right) \left( x_{t+k} - \bar{x} \right)$.
On the raw frequency scale, frequency component peaks may be hard to see. It is common practice to plot the frequency magnitude in dB (10 $log$ 10). This transformation accentuates the frequency peaks.