A beta is an unfinished build of a game or application. It is expected to behave much like the final product will, but with no guarantee that any given feature works or will survive to release. The point of a beta is to find out where it breaks and what needs changing before launch.
An open beta is released to the general public. Anyone can join, which produces a large volume of feedback and stress-tests the servers under realistic load.
A closed beta goes to a limited, invited group instead. Developers often prefer this for commercial products because it keeps the build out of general circulation — an open beta can otherwise let players experience most of a game without buying it.