The loopy thingy
What you're looking for is a redstone clock. And for some of those, you could go to https://minecraft.gamepedia.com/Clock_circuit#Repeater_clock and have fun trying out on of those concepts.
The simplest redstone clock (the first shown from the link above) is two repeaters parallell to each other not in the same direction and then redstone dust on either side. After powering this with a block and/or torch it'll keep on repeating until the chunk is unloaded.
Repeater explanation
The main usage of a redstone repeater is to extend and "power" up the signal it receives. This is done with a delay of 1 redstone tick. It's not repeating anything in the more common sense of doing something again and again. For more on the "repeater" part see wikipedia, which starts of by saying:
A radio repeater retransmits a radio signal.
In telecommunications, a repeater is an electronic device that receives a signal and retransmits it. Repeaters are used to extend transmissions so that the signal can cover longer distances or be received on the other side of an obstruction.
This is transferable to the Redstone Repeater as it receives the redstone signal and retransmits it (with a delay). This allows for the signal to transfer much further distance (beyond the original 15 blocks), and to go through solid blocks.