Judicial execution around that time was very rare and on the decline. Rabbi Akiva (c. 40-137 CE) said that a court that ever executes is bloodthirsty; Rabbi Eleazar ben Azariah, dates uncertain but in the generation before R. Akiva, said a court that executes once in 70 years is bloodthirsty (Makkot 1:10, Babylonian Talmud).
Capital punishment was legal under Jewish law, but had so many restrictions that it was difficult to carry out. Among things, you needed two eyewitnesses who warned the person before he transgressed that he was about to commit a capital crime. This is, granted, more likely for ongoing "public" crimes like blasphemy than it is for murder. While we assume that adultery is a private affair, a flagrant case could possibly satisfy these requirements.
As for the case in the question,
this answer gives information on the process for stoning. Note that this doesn't match up with John's account of this case: under the law the two eyewitnesses, not random members of the group making the inquiry ("he who has not sinned", v7), would have to be the ones to begin the stoning. If we assume that Jesus was following the law (suggested by John's comment that this was a trap), then he could not have allowed events to proceed as he advised. That suggests to me that he did not intend his words to be taken literally and that it was a rhetorical device.
More information about the four methods of execution and which crimes they applied to can be found here and here.