This is a tough question to answer, many due to the fact that everyone's metabolism is different. For most people, you need to do both.

There are many different types of exercise out there, depending on what you are looking for. There are countless types of weightlifting routines to build muscle, cardio programs to lose fat, and all around programs to do a little of both.

The one thing that people forget when trying to get the body they dream of is their diet. Doing sit-ups at the end of a workout with no cardio and a 12 pack of beer late night will not get you a six pack. Sit-ups will build your core/ab muscles, but cardio is what will show them. Your diet is what will provide you with the fuel to do your workouts, but you also have to watch your calorie intake. Taking in more calories than you need will not help in weight loss.
Concentrate on building muscle 3 days a week and doing cardio 2 to 3 days per week. An example would be a Monday-Wednesday-Friday weightlifting split. Do cardio on Tuesday-Thursday, and leave the weekend for recovery.

Your diet should consist of small meals, 5 to 6 times per day. Eat whole grains for carbohydrates, lean meats for proteins, and low fat dairy options. Grains can be brown rice, whole wheat pasta, whole wheat bread, or shredded wheat cereal. Proteins can be lean red meat, chicken, eggs, or protein shakes. Be sure to eat a few servings of both dairy and fruits too. Vegetables are also very important. They can fill you up without the excess calories. Get 4-6 servings of these.
Try not to eat any junk food. It will just slow your progress down. Too much beer or alcohol will do the same, and may lead to you overeating late night.

In summary, combine weightlifting and cardio with a good diet, eating 5-6 small meals per day, and you should be on your way to losing the pounds. If you don't like going to the gym to workout, there are many programs out there that can help you do this from the comfort of your own home. Currently my favorite one uses kettlebell training. You can find the link below. Good luck!

About Author / Additional Info:
http://www.kettlebellworkout1.com