Above a critical velocity, the dominant mechanism of energy transfer between a moving object and a dilute Bose-Einstein condensate is vortex formation. In this paper, we discuss the critical velocity for vortex formation and the link between vortex shedding and drag in both homogeneous and inhomogeneous condensates. We find that at supersonic velocities sound radiation also contributes significantly to the drag force.