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. Such metal was nearly non-existent in the early universe, and has since been produced within stars as well as supernovae and other cataclysmic events. Its abundance relative to hydrogen and helium is still low in the universe, including in stars and clouds, but it is key to the occurrence of rocky planets.
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 in which the electrons in the outer orbit are easily removed, which is the basis of the electrical and heat conductivity. Under very high pressure (millions 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, which are believed to be present within Jupiter and Saturn.