This requires energy. The oxidized form is on the left and the reduced form is on the right. After reduction, NAD can carry two protons and two electrons. ATP is a carrier of chemical energy in the form of high energy phosphate bonds. Another common metaphor for them is money.
Money is a medium of exchange.
People assign work for us to do, we receive money for doing it, and we convert that money into things we want or need. The cell takes its energy source, converts it into NADH and ATP, and then uses them to perform needed tasks in the cell. It is amazing to consider that given the diversity of life on this planet that we all use the same energy carriers. Hydrogen is the smallest element. It has one proton in its nucleus and one electron orbiting it.