As others have said, they look for the willy on boys and with girls it is the presence of the 3 lines. If they cant see a willy it doesnt automatically mean its a boy, cos it might be lying at a funny angle or have it tucked in his legs, they wont just say its a girl if they dont see the lines. Our gender scan lasted about an hour in total because baby was being awkward, but the sonographer explained to us in great detail how they check for gender. She also had the cord in between her legs at one stage which I guess could be mistaken for a willy, but they can check things like the blood flow, which would obviously indictae the cord rather than a willy. Even when they have seen the goods and are pretty positive what it is, they will still only tell you they are 95% sure to cover their own backs in case they are wrong. As far as Im aware the only fool proof way of knowing the sex is with tests like the amnio where they actually grow cells from your baby so theres no doubt. Ours was certain its a girl after having several good views of her lady bits, so Im fairly confident, considering she explained it all so well and pointed things out to us. There is always a small element of doubt though right up until birth! x