Electronic stud finders work by sending low-energy electronic pulses into the wall. The material in the wall will absorb some of this energy. In areas where there is a lot of material in the wall (i.e. where a stud is present), the wall will absorb slightly more energy than areas where there is less material in the wall (i.e. areas where a stud is NOT present). This is the principle that allows electronic stud finders to work.
However, a single reading is not sufficient to determine the location of studs. A high reading could mean that the sheetrock is thicker than normal, or it could mean that a stud is present. The stud finder can only figure out if a stud is present, after the stud finder has been moved back and forth across the way. After moving across a wall the stud finder learns what a high reading looks like and what a low reading looks like. Then it can display the locations of studs. This is the basic explanation for how other electronic stud finders work. Although other stud finders are functional, they often lack accuracy.