An asteroid is an object in space smaller than a planet and can range in size, diameter and orbit. They can also be called minor planets or planetoids. A group of asteroids in orbit of a star are called an asteroid belt or an asteroid field.
Earth Starfleet and the Denobulans constructed Cold Station 12 on an asteroid sometime in the early 22nd century. (ENT: "Borderland", "Cold Station 12", "The Augments"). This facility was still in use by the 24th century. (Star Trek: Remington)
During the 23rd century, the USS Enterprise and later the USS Enterprise-A encountered several asteroids in their travels, including the Companion's homeworld, Fabrini ship Yonada, the Genesis Project testing ground in the Regula system and the Klingon penal asteroid Rura Penthe. (TOS: "Metamorphosis", "For the World is Hollow and I Have Touched the Sky"; Star Trek II: The Wrath of Khan; Star Trek VI: The Undiscovered Country)
In 2370, the USS Enterprise-D discovered the wreck of the USS Pegasus embedded inside an asteroid. After being trapped inside by a Romulan warbird, the Enterprise escaped by phasing through the asteroid using the Pegasus's illegal phasing cloak. (TNG: "Pegasus")