To understand the origin of ultra-high energy cosmic rays (UHECRs, defined to be above 10 18 eV), it is required to model in a realistic way their propagation in the Universe. UHECRs can interact with low energy radio, microwave, infrared and optical photons to produce electron/positron pairs or pions. The latter decay and give rise to neutrinos and electromagnetic cascades extending down to MeV energies. In addition, deflections in cosmic magnetic fields can influence the spectrum and sky distribution of primary cosmic rays and, due to the increased propagation path length, the secondary neutrino and γ−ray fluxes. Neutrino, γ−ray, cosmic ray physics and extra-galactic magnetic fields are, therefore, strongly linked subjects and should be considered together in order to extract maximal information from existing and future data, like the one expected from the Auger Observatory. For that purpose, we have developed CRPropa, a publicly-available numerical package which takes into account interactions and deflections of primary UHECRs as well as propagation of secondary electromagnetic cascades and neutrinos. CRPropa allows to compute the observable properties of UHECRs and their secondaries in a variety of models for the sources and propagation of these particles. Here we present physical processes taken into account as well as benchmark examples; a detailed documentation of the code can be found on our web site.