I think the first rule for an object should always be to lower its energy. In classical mechanics, an apple want to fall to lower its potential energy (the height). On the other hand, breaking the bond with the tree also costs energy. This is the activation energy which needs to be provided before the apple can fall. The same holds for quantum physics, but is is more complicated since energy can be stored in different kinds.
In classical mechanics, the energy levels can be found by solving Newton’s equations. In quantum mechanics, it is Schrödinger’s equation which should be solved.
Also in electromagnetism this applies. In this field, charge can cause an energy. This is the reason why equal charges repel while opposite charges attrackt. Here, Maxwell’s equations apply.