An alley was a type of road running between or within buildings; that was normally more narrow than a street, usually suitable for pedestrian rather than automobile traffic, although both were common.
Upon arriving in New York City during the 1930s via the Guardian of Forever, James T. Kirk and Spock found a fire escape in an alley with clothing on it that they stole so as to blend in with their 20th century environment. (TOS: "The City on the Edge of Forever")
In 2267, on the planet Argelius II, Redjac murdered Kara, a female belly dancer, in a foggy alley. Although he managed to frame Montgomery Scott, the chief engineer of the starship Enterprise. (TOS: "Wolf in the Fold")
In 2364, Lt. Commander Data read a detective novel in which a vendor by the name of O'Hagan had set up shop in an alley. He did this to better prepare himself for joining Jean-Luc Picard, the captain of the USS Enterprise-D on an adventure in the holodeck, where he would be playing in a similar story, The Big Good-Bye. (TNG: "The Big Goodbye")
In 2368, when Jean-Luc Picard experienced the life of Kamin because of a mental connection to a Kataan probe, he at first thought that he was abducted, and he left Kamin's home, and walked through the alley outside his residence. (TNG: "The Inner Light")