Before revision: In real transformers, some energy is lost inside to heating of the metallic core of the transformer, and lost outside to the surrounding environment because of imperfect magnetic coupling between the two coils.
After revision: to the resistances within the winding conductors,In real transformers, some energy is lost inside to heating of the metallic core of the transformer, and lost outside to the surrounding environment because of imperfect magnetic coupling between the two coils.