You can logon to the battle.net website, and somewhere in the screens where you select your available games there's an area where you can opt in for any related betas that come out. You have to download and run an application that sends Blizzard your system specifications, so presumably they select customers with particular system specifications they're looking to have tested for the beta of any given game.
Besides that, some games they also give out keys to give to your friends, such as with Starcraft 2 when a friend gave me a beta key.