There are a number of ways of making periodic signals (``oscillators''). For clock signals used in digital circuits, the periodic signal is made into a square waves. The simplest way to make a periodic signal is to use an AC generator. You can use an LC circuit as well. A modern way is to use a piezoelectric crystal which vibrates at a particular resonant frequency- these can give very precise frequency signals. Here's more info on oscillators: https://en.wikipedia.org/wiki/Electronic_oscillator.