Once you get access, which requires some kind of membership or paid guest pass, you can hear the car run and if it's marked "Runs and Drives" you're allowed to move the car forward and backwards a few feet. You can probably plug in a code reader but anything more than that isn't allowed as far as mechanical diagnostics. If you're a mechanical guy you get a pretty good idea of what you're buying if you can be there in person. A combination of factors and common sense drives the decisions...
I've heard that you can pay for a third-party inspection at some yards, which is an independent inspector that provides a report for a fee.