We use numerical simulations to study the dynamics of surface discharges, which are common in high-voltage engineering. We simulate positive streamer discharges that propagate towards a dielectric surface, attach to it, and then propagate over the surface. The simulations are performed in air with a two-dimensional plasma fluid model, in which a flat dielectric is placed between two plate electrodes. Electrostatic attraction is the main mechanism that causes streamers to grow towards the dielectric. Due to the net charge in the streamer head, the dielectric gets polarized, and the electric field between the streamer and the dielectric is increased. Compared to streamers in bulk gas, surface streamers have a smaller radius, a higher electric field, a higher electron density, and higher propagation velocity. A higher applied voltage leads to faster inception and faster propagation of the surface discharge. A higher dielectric permittivity leads to more rapid attachment of the streamer to the surface and a thinner surface streamer. Secondary emission coefficients are shown to play a modest role, which is due to relatively strong photoionization in air. In the simulations, a high electric field is present between the positive streamers and the dielectric surface. We show that the magnitude and decay of this field are affected by the positive ion mobility