How do I make sure that the meat cooks well and yet stays juicy on a bbq?
Common noob mistakes:

Cooking things too long. Meat dries out when it's cooked to too high an internal temperature. That's the whole thing, and it's true no matter how you cook something. If you like your meat to be completely devoid of pink inside, it will be dry. No avoiding it. Find out what's a good temperature for the doneness you desire, and use an instant-read thermometer to find out when you get there. You will also find that some cuts of meat want more cooking than others. A skirt steak wants hardly any cooking because it dries out easily. A New York strip, with good fat marbling, can withstand more cooking because it has that nice fat to keep things moist.

Cooking with too much heat or too little. When the heat's too high, you burn the outside before the middle can get to the temperature you want. If it's too low, you never really get a good sear on the outside, and miss out on much of the grilled food experience. And you'll need to learn to tailor your heat to the needs of what you're cooking--fish typically needs less than chicken, which needs less than beef or lamb.

Putting the meat on too early. You need to wait for the charcoal to ash over and stop flaming. If you don't wait for the coals to get right, you run a much greater risk of flare-ups and scorched food, not to mention off flavors from unburned wood or fillers in your charcoal. This is a non-issue with gas grills.

Not preheating the grate. You need to put the grill grate over the coals as soon as you can so it preheats well. If your grate isn't preheated, you won't get grill marks, and your meat is more likely to stick. You need to do this if you have a gas grill too--maybe more so, since they typically don't get as hot.

I'd recommend that you find a basic book about grilling. Any of Steven Raichlen's books will give you the general tips on how to do things. I'm not wild about his overuse of rubs and sauces--I think they're totally unnecessary most of the time--but he does know his way around a fire and a grill grate. 

However, if you want your meat well-done, be prepared to eat a lot of dry (and likely tough) meat. Your only option at that point is to switch to low-and-slow techniques that cook things like pork shoulder for a really long time at a low temperature (traditional barbecue). The meat gets fully cooked, but because it has a lot of fat and connective tissue to render, retains a moist mouthfeel. But this isn't grilling, per se, and takes many hours.