Apple has rolled out the OS X Yosemite public beta. The program was announced last month at WWDC and allows ordinary users to test a prerelease version of the operating system before its general release in the fall.
Users can obtain a redemption code to download the beta from the Mac App Store at this link: https://appleseed.apple.com/sp/betaprogram/. Once there, if you've already signed up, click sign in and enter your Apple ID. If you haven't, click sign up to become a member.
Once logged in, you'll be required to accept an agreement and then be issued a redemption code. Click the link and you should be directed to the Mac App Store.
It seems like early adopters are getting an error with the code already being redeemed. If this happens, try refreshing the page to get a new one.