You just need a vast lighting difference between your subject and background, expose for your subject and the background either clips into black or blows out into white. Examples would be shooting a subject against the sky and spot metering on the face, or a subject at night under a lamp, again spot metering for your subject.
in short. it depends on distance from light to subject VS subject to background.
dark background = short light to subject distance VS Long subject to background distance and vice versa.
of course this is not the only factor/method. but its the easiest considering not having a black/white/grey paper back/painted wall etc etc.
Be sure to exclude ambient light in your shots if using this method, otherwise ambient will light the bg. There are also ways to exclude ambient. Method 1: SS to max sync speed, then down aperture & increase flash power till over power ambient. OR (Recommended) method 2: turn off the bloody light