They used various methods. They would either knock on walls to see whether the walls are fake or made out of plaster which would make a different sound and show that the area behind it is hollow and that the wall is thin, or they would use things like stethoscopes and listen to what is happening behind walls and try to hear things like breathing or crying similar things. They would remove floorboards in order to see whether there's only ground under them or whether there's a hidden passage.