Selenium is a web testing framework that allows for cross-browser testing and integration with continuous integration tools. It has two primary versions, with version 1 using Selenium IDE to record tests as Selenium commands and version 2 using WebDriver APIs to programmatically control browsers. Selenium tests functionality across different browsers for fidelity and can be run across a variety of backend servers and browsers. Setting up Selenium for continuous integration can involve using Selenium Builder for test recording, storing tests on GitHub, running tests via Travis CI on each commit, and using Sauce Labs servers for remote browser control.