How to use a transformer to power a 5V chip (an Atmega328)?
(Note that ready-made power supplies that will fit your requirements are available just about everywhere. These remove safety hazards associated with mains voltage, so they're very much recommended for a beginner.)

Here is a random linear power supply circuit:



Your transformer outputs AC, so you need to 1) rectify it using a diode bridge and 2) bring it down to regulated 5V using a linear regulator. The transformer should be rated for the current you need with some margin.

Output voltage of your transformer should be somewhat larger than desired voltage to take into account linear regulator dropout and diode drop, but not too large because any excess power will have to be dissipated by the regulator as heat.

Diodes should be able to withstand both forward current and reverse voltage (this is essentially guaranteed automatically for power diodes). A 1N4007 (rated for 1A) will likely fit. If not, cheap 5A diodes are available. A diode bridge is more convenient than 4 individual diodes.

The regulator (7805, LM1117-5.0 or any number of other ICs) should also be rated for the current you need. Note that a heatsink might be required.

Choice of capacitors is normally dictated by the linear regulator datasheet. There's normally some minimum value required for stability. The capacitors should be rated for voltages they're under. Note that the voltage is >5V for C1, and it's also pulsing, so make sure you provide a large margin for safety.

Note that you really want a mains switch and a fuse before the transformer (not shown in the circuit). Also note that mains can kill you, so read up on electrical safety before doing anything if you have not done so already.

Everything that is connected to mains is connected in parallel so that full mains voltage and lowest possible source impedance is available for every device.