A measurement of WW production in pp collisions at sqrt(s) = 7 TeV and a search for the Higgs boson are reported. The WW candidates are selected in events with two leptons, either electrons or muons. The measurement is performed using LHC data recorded with the CMS detector, corresponding to an integrated luminosity of 36 inverse picobarns. The pp to WW cross section is measured to be 41.1 +/- 15.3 (stat) +/- 5.8 (syst) +/- 4.5 (lumi) pb, consistent with the standard model prediction. Limits on WW gamma and WWZ anomalous triple gauge couplings are set. The search for the standard model Higgs boson in the WW decay mode does not reveal any evidence of excess above backgrounds. Limits are set on the production of the Higgs boson in the context of the standard model and in the presence of a sequential fourth family of fermions with high masses. In the latter context, a Higgs boson with mass between 144 and 207 GeV is ruled out at 95% confidence level.