I apologize in advance if I don't explain things well. I am working on it HAHAHAH!
Step 1) Get your background to the exposure you'd like it to be.
In the first 2 photos below, I basically underexposed the background because that's the feel I wanted (I made it darker than it really is). You must also consider what your flash sync speed is. On my camera, it's 1/250 of a second. So I set it to that as a starting point, and then I made the aperture as small as I had to in order to darken the background (higher f/stop numbers). It ended up being f/22. And to give you an idea.. this is basically noonday, and it's a bright and sunny day. Bright blue skies and all that. But in this case, I was able to mute the background.
Step 2) Place your flash somewhere near the subject.
Ideally if you want a traditional shadow pattern on your subject, you should place it at a 45 degree angle to the subject. I did that for both the first pic and the third. The second one was sidelit. The closer the light is to the subject, the less flash power you need to use. So get in close (without the flash being shown in the pic).
Step 3) Fire and see what happens.
If your background is set the way you want it to be, then all you have to do is worry about the flash power. You can adjust the power up and down as you see fit to allow the subject to be lit properly.
I guess I will include my settings below in case that's any help.. It will always vary depending on the light and all that, but .. yeah hehehe. And these are straight out of the camera, except for a vignette on the last pic.
iso 160, 35mm, 1/250 sec, f/22