If you are in the Delayed Enlistment Program (DEP), you would first have to request a DEP discharge from the branch you are enlisted in, and then apply to join the other service through the other service's recruiter. See our DEP Article for details. Military recruiters are prohibited by regulation and policy from "actively recruiting" members of other service's DEP.
Once one goes on active duty, with the exception of a few commissioned officer specialties (such as physician), one cannot simply transfer from one branch of the service to another.
To move from one branch to another requires one to complete their enlistment contract, then get out, and then visit a recruiter to join the different service, as a prior-service recruit. This is by no means a "sure thing," as prior-service slots are limited.
A new program has recently been announced, but has not yet been put into place, which will allow members of the Navy and Air Force who are serving in over-manned jobs to request early discharge, in exchange for agreeing to a three-year active duty enlistment in the Army. The name of this program is "Blue to Green."
Under an inter-service agreement, members of the Air Force, Navy, Marines, and Coast Guard can also request an early discharge to apply for the Army Warrant Officer Program.
Additionally, active duty enlisted members can apply for an early discharge if they are accepted into the Officer Candidate School/Officer Training School of another service.