A yard was a unit of length (or distance) on equal to three feet or thirty-six inches. This measure was commonly used on Earth during the 19th and 20th centuries, as well as by the crew of the USS Enterprise during the 2260s.
Comparative units of length
In the Melkot's bizarre 2268 recreation of Tombstone, Arizona, Sylvia informed "Billy Claiborne" (actually Pavel Chekov) that she had found yards and yards of a "scrumptious material", which she hoped to use to make a wedding gown. (TOS: "Spectre of the Gun")
While traversing Lactra VII in 2269, Kirk, Spock and McCoy narrowly missed an unusual lake that did not conform to the planet's conditions. After nearly falling into the lake, the relieved McCoy stated, "10 yards the other way and we'd be boiled alive." (TAS: "The Eye of the Beholder")
Ensign Garrovick was about 20 yards distant from the dikironium cloud creature, when he encountered it on Argus X in 2267. When Captain Kirk learned of this, he chastised Garrovick, stating, "you fired at a large, hovering target at that distance and missed?" (TOS: "Obsession")
During the World War II holodeck simulation, Chakotay as Captain Miller, called in the artillery unit Charlie One. He coordinated with them that the enemy placements were at a distance of 800 yards, be sure to correct for crosswinds, before ordering them to open fire. (VOY: "The Killing Game") Later when "Miller" inquired as to the status of C Company, he was told they were holding position about 200 yards from their present location. (VOY: "The Killing Game, Part II")
During the battle on Cestus III, lead by Captain James T. Kirk against the Gorn in 2267, the enemy was determined by Spock to be located in the surround mountains outside the outpost at an azimuth of ninety-three degrees, and a range of 1,570 yards. As Kirk and Spock moved through the destroyed outpost, Spock was able to determine for Kirk that the arsenal was about 100 yards away. After locating a photon grenade in the outpost's arsenal, Kirk conferred with Kelowitz the estimated whereabouts of the Gorn from their position. Kelowitz guessed that they would go to the high ground on the right, giving a Kirk a measurement of 1,200 yards, at an azimuth of eighty-seven degrees. He also noted that that distance was "pretty close for one of these little jewels." (TOS: "Arena")
Later that year, according to the chart of the tunnels on Janus VI, the two encountered by Kirk and Spock converged a few thousand yards up the line, where the two were to meet up again during their search for the Horta. (TOS: "The Devil in the Dark")