The best and most accurate gadget I ever saw for doing this was sold about 30 years ago under the name "Morrison Probe". It consisted of a thin piece of tube, about 1/8" O.D., with a 90 degree bend of about 1" radius. On one end, it had a little triangular plastic piece set perpendicular to the tube. There was also a piece of stiff piano wire running through the tube, with a plastic handle on the end.
What you do is push the tube thru a small hole, and turn the plastic triangle to get the piece of tube inside the wall pointing horizontally. Then push in the piano wire until it hits a stud. without moving the piano wire, pull the whole works out, and use it to measure from the hole to the stud.
That's fine for getting a precise location when you're sure you want to mess with holes in the wall. But sometimes you just want to know roughly where the studs are, without doing any damage, so you can plan and decide where to put some alteration.
For that kind of rough guesstimate, I use an electric shaver and a piece of cloth. Wrap the cloth around the shaver, so you don't make marks. then turn it on, and hold one corner against the wall. Move the shaver from side to side, and listen to the sound of the reverberating wall. You should find narrow solid sounding places, with larger hollow sounding places in between. Those narrow places are the studs.