Essential physical processes in the formation of protostars and protoplanetary disks are described. Recent advances in non-ideal magnetohydrodynamics simulations, which cover a huge dynamic range from molecular cloud core density (104/cc) to stellar density (1022/cc) in a self-consistent manner, enable us to study the realistic evolution of the magnetic field and rotation of protostars and the dynamics of outflows and jets. First we emphasize the importance of radiative heating and cooling, and describe thermal evolution in a self-gravitationally collapsing cloud. The increased pressure at the center creates the first hydrostatic core, which consists of molecular gas. After the dissociation of molecular hydrogen triggers the second gravitational collapse at the center of the first core, a protostar is quickly formed and the first core gradually transforms into a circumstellar disk that eventually accretes onto the central protostar. The importance of the short-lived first core formed in the early collapsing phase is emphasized in the contexts of driving magnetohydrodynamical bipolar outflows and self-gravitational fragmentation into binary or multiple stars. When the central density becomes sufficiently high (1012/cc), ohmic dissipation largely removes the magnetic flux from a collapsing cloud core, and the strongly twisted magnetic field lines are straightened. The magnetic field lines are twisted and amplified again for much higher density (1016/cc) where the magnetic field is recoupled with warm gas (∼103 K). Finally, protostars at their formation epoch have magnetic fields of 0.1–1 kG, which is comparable to observed values of pre-main-sequence stars. A substantially reduced magnetic flux at the center results in passively wound-up magnetic field lines just after the formation of a protostar. This is followed by driving of a fast bipolar jet along the rotation axis by the resultant magnetic pressure due to excessive winding. Strong collimation of the jet is due to the hoop stress of piled-up toroidal field lines. The angular momentum in a collapsing cloud is removed by magnetohydrodynamical effects such as magnetic braking and driving of outflows and jets. The rotation velocity of the protostar tends to be on the order of break-up speed at its formation epoch, and thus, a further removal mechanism for the angular momentum, such as through the interactions between the protostar, disk, jets, and winds, should be important in its long-term evolution. The circumstellar disk is born in the “dead zone,” a region that is decoupled from the magnetic field. The outer radius of the disk increases with that of the dead zone during accretion from the envelope of the molecular cloud core. A rapid increase in the disk size occurs after depletion of the envelope. The circumstellar disks remain massive in their formation phase, and are subject to gravitational instability, even at 10 AU from the central stars. The further long-term evolution of massive disks is also described. This may provide an improved description for the realistic initial condition and environments for planet formation in gaseous protoplanetary disks.