In my understanding, energy is conserved (remains constant over time) as long as the equations of motion of the system have no explicit time dependence. In other words, energy conservation is not a fundamental "law" of the universe. Rather, it's a consequence of the observation that there's no preferred origin for time. In a system where energy is conserved, you can start your clock at zero any time you want and it won't matter.
Given that, one can imagine systems where energy is not conserved. The classical example often given is an oscillating mass on a spring that's being driven by some external (typically periodic) force. Here the choice of zero time does matter. Basically, the longer that driving force is "on", the more energy gets pumped into the oscillating mass.
Finally, the amount of energy in a system is actually quite arbitrary. The kinetic energy of a particle depends on which inertial reference frame the observer chooses. The potential energy of a system is well defined only up to an arbitrary constant. This makes energy quite a different sort of beast than, say, electric charge. The amount of electric charge in a (closed) system is not only conserved, it's invariant. That means charge doesn't vary with the speed of the observer, unlike energy.