Holodeck matter, also known as holomatter, was a partially stable substance giving the illusion of solid matter, held together by force fields created by hologenerators.
Outside of the range of holographic projectors this substance lost cohesion and quickly dissipated into energy. Within range, this substance could have all the properties of "real" matter but was controllable by complex computer software.
Holograms were typically combinations of photons, force fields, and matter (both "real" and holographic) used in degrees of complexity depending on computer safety settings. (TNG: "Encounter at Farpoint", "The Big Goodbye", "Elementary, Dear Data", "Ship In A Bottle"; VOY: "Phage", "The Killing Game", "The Killing Game, Part II", "Extreme Risk"; et al)