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.
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")