Energy is a property, not a physical object. Energy needs a bearer, and only with a bearer can energy get from one place to another. Also an exchange of energy between two bearers is possible. Bearers can be e.g. physical bodies or radiation. The change of the place must not necessarily be connected with the change of a level. More about energy can be found in https://en.wikipedia.org/wiki/Energy (in English and in more than 160 other languages).
In classical physics, energy is regarded as continuous. According to quantum mechanics, "energy, ... and other quantities of a bound system are restricted to discrete values (quantization)" (https://en.wikipedia.org/wiki/Quantum_mechanics). At the level of macrophysics (i.e. in systems we can see with our eyes), classical mechanics can be used. However, at the level of atoms and particles, only quantum mechanics can explain the observed phenomena. See also https://en.wikipedia.org/wiki/Planck_constant.
As I wrote earlier, energy sometimes flows from higher energy levels to lower ones, but it is also equally possible that a system gets to a higher level. When you climb a flight of stairs, for example, your body has more potential energy than before. You have done physical work for this, i.e. you have converted chemical energy from your muscles into potential energy. See https://en.wikipedia.org/wiki/Potential_energy. This holds for all forms of energy.
What kind of energy , two magnets 🧲 placed at opposite poles to each other exhibit? They will attract each other and the lighter magnet will cling to the heavier one. Then energy is not flowing from higher mass to a lower mass.
A magnetic field has similar properties to a gravitational field. A weaker magnet (or a small iron particle) has potential energy in the magnetic field of a stronger magnet. If you move the two magnets away from each other, you increase the potential energy. This is similar to climbing a staircase in the earth's gravitational field. If the weaker magnet moves towards the larger one, its potential energy decreases. This has nothing to do with the masses of the two magnets, only with the magnetic field. (The stronger magnet can also have a smaller mass if it is made of a more magnetisable material). If the two magnets are lying on a table, the potential energy is converted into heat as a result of friction during the movement.
This is the last answer on elementary physics that I will give. Please read good physics books, I recommend e.g. the "Feynman Lectures".
Photon energy is kinetic energy. If the temperature is high, more kinetic energy will be radiated, and the received kinetic energy is less than its radiated kinetic energy. This is why energy, heat and temperature flow.
Energy can move from one object to another, like when the energy from your moving foot is transferred to a soccer ball, or energy can change from one form to another. When the energy in a battery is used to power an electronic device, chemical energy is transformed into electrical energy, which moves along wires.