This paper reports an experimental study of the influence of a magnetic field on the phase transition and low-temperature dynamical properties of two-dimensional superconducting films. Five samples of granular indium/indium oxide composite films were studied, with sheet resistances varying from 945 to 3150 \ensuremath{\Omega}/\ensuremath{\square}, and thicknesses from 100 to 250 A\r{}. Measurements were made of the resistance R(T,H) and of the current-voltage characteristics in perpendicular magnetic fields of maximum value 30 G. The temperature range investigated ranged from 0.7${T}_{c0}$ to 1.5${T}_{c0}$, where ${T}_{c0}$ is the Bardeen-Cooper-Schrieffer mean-field transition temperature. In the temperature regime above ${T}_{c}$, the Kosterlitz-Thouless vortex unbinding temperature, the resistance was found to obey universal magnetic field scaling. Below ${T}_{c}$, the magnetoresistance displayed an activated temperature dependence characteristic of vortex pinning. The pinning activation energy U(H,T) increased with a Ginzburg-Landau temperature dependence below ${T}_{c}$ and displayed an unusual magnetic field dependence, varying inversely with magnetic field below 1 G, but becoming independent of field in stronger fields. As ${T}_{c}$ was approached from below, all signs of vortex pinning disappeared, with U(H,${T}_{c}$)=0 and the magnetoresistance exhibiting linear Bardeen-Stephen behavior. These results are interpreted in the context of other work on two-dimensional superconductors.