The physics definition is that matter has mass
even when it is not moving, while energy only has
anything when it is moving. We call this a "rest
mass". So, for example, light is energy, not
matter. It gets tricky when you talk about forms
of energy that are made of moving matter such as
sound, heat, or electricity - are they matter or
not (the things doing the moving sure are)?
As a general rule, if it takes up space, it's
probably matter. If it has mass even when it isn't
moving, it's definitely matter.