In many situations in signal processing, controls, and communications, we may want to change the rate at which we had originally sampled a discrete-time signal. We refer to this process as resampling or discrete-time sampling. In this lecture, we talk about downsampling (also known as decimation), decreasing the sampling rate by an integer factor $N$, and upsampling (also known as interpolation), increasing the sampling rate by an integer factor $M$.
The basic downsampling operation is downsampling by 2. Mathematically, downsampling a signal $x[n]$ by 2 is defined by $$x_d[n] = x[2n] \; .$$ Notice that this is essentially a ``time-shrinking'' of the discrete-time signal by removing every other value. In time, the difference between this operation in discrete-time and continuous-time though is that we must now throw away samples.
In frequency, the difference between this operation in discrete-time and continuous-time is a little more complicated. Rather than stretching across frequency by a factor of 2 and dividing by 2 (the result in continuous-time), we individually stretch and divide each period of the DTFT around the integers of $2 \pi$ and then sum the results.
We can extend the concepts above to downsample by any integer number $N$. Downsampling a signal $x[n]$ by $N$ is defined by $$x_d[n] = x[Nn] \; .$$ That is, we keep only every $N$-th sample from $x[n]$. In frequency, we again see the same ``periodic stretching,'' except we now stretch by a factor of $N$ and divide the amplitude by $N$.
As with continuous-time sampling, we can experience aliasing from downsampling (discrete-time sampling). Graphically, if the frequency content is stretched too much, we will get overlap (aliasing) and will no longer be able to perfectly reconstruct the original signal. If the maximum frequency stretches beyond $\omega = \pi$, we get aliasing.
To counter aliasing, signals filtered using a low-pass, discrete-time anti-aliasing filter before downsampling. To ensure that aliasing does not occur, the cut-off frequency of an ideal filter would ideally be $\omega_c = \pi/N$, where $N$ is the downsampling factor, and the gain would be $1$.