In astrophysics, the term metal is used for any element other than hydrogen or helium. Metallicity is a measure of the amount of such elements in an astronomical body such as a star.
The common meaning of metal is a particular class of substances that are hard, opaque, transmit heat and electricity, and can be heated to the point of malleability. Science (outside astrophysics) refines the term to mean elements for whom the electrons in the outer orbit are easily removed, which is the basis of the electrical and heat conductivity.
Under certain characteristics which includes very high pressure (thousands of atm), hydrogen and helium are theorized to have a metal-like phase that conducts electricity, called metallic hydrogen (or conductive hydrogen) and metallic helium, though neither has been unequivocally produced in the lab. Jupiter and Saturn are theorized to provide the necessary central pressure to make these a significant portion of their masses. It has been suggested that Jupiter has a dilute core due to its "rocky" core being eroded by this central high-density hydrogen and helium.