It's both. Neither Energy nor Matter can be truly destroyed, only converted between one another. With some weird edge cases because physics get wonky the deeper you look at it.