Using a point-charge calculation of the electrostatic crystal field, we determine the non-degenerate orbital ground state of the ferromagnetic Mott insulator YTiO3, which is found to agree perfectly with experiment. Based on the orbital order, we obtain by perturbation theory an effective spin Hamiltonian that describes the magnetic superexchange between nearest-neighbor Ti ions. The superexchange Hamiltonian includes, in addition to the isotropic Heisenberg coupling, antisymmetric (Dzyaloshinskii-Moriya) and symmetric anisotropy terms, caused by the spin-orbit interaction on the Ti ions. We find ferromagnetic Heisenberg couplings for Ti–Ti bonds in the crystallographic ab planes, but antiferromagnetic ones for Ti–Ti bonds between planes, in contradiction with experiment (which gives ferromagnetic couplings for both). Difficulties in calculating realistic values for the isotropic couplings of YTiO3 have been already reported in the literature. We discuss possible origins for these discrepancies. However, the much smaller values we obtain for the symmetric and antisymmetric anisotropies may be expected to be reliable. We therefore combine the experimentally-deduced isotropic coupling with the calculated anisotropic ones to determine the magnetic order of the Ti ions, which is found to be in satisfactory agreement with experiment. Based on this magnetic order, we derive the spin-wave spectrum. We find an acoustic branch with a very small zone-center gap and three optical spin-wave modes with sizeable zone-center gaps. The acoustic branch reproduces the one reported in experiment, and the optical ones are in a satisfactory agreement with experiment, upon a proper folding of the magnetic Brillouin zone.