This thesis develops new and powerful methods for identifying planetary signals in the presence of "noise" generated by stellar activity, and explores the physical origin of stellar intrinsic variability, using unique observations of the Sun seen as a star. In particular, it establishes that the intrinsic stellar radial-velocity variations mainly arise from suppression of photospheric convection by magnetic fields. With the advent of powerful telescopes and instruments we are now on the verge of discovering real Earth twins in orbit around other stars. The intrinsic variability of the host stars themselves, however, currently remains the main obstacle to determining the masses of such small planets. The methods developed here combine Gaussian-process regression for modeling the correlated signals arising from evolving active regions on a rotating star, and Bayesian model selection methods for distinguishing genuine planetary signals from false positives produced by stellar magnetic activity. The findings of this thesis represent a significant step towards determining the masses of potentially habitable planets orbiting Sun-like stars.