I think the key factor to winning a war is to fight the war on your terms. In order to do this you need to have a strong military. Now what works out to be a "strong" military is a little iffy as the Civ ( and hence the AI ) seems to rank military a little funny. During the ancient age, it is pretty much number of units vs number of units. Later on in the game you will need to have spies to correctly rate your army vs his army. This is due to the fact the AI loves to keep around antique units. At this stage the computer rates your and an AI army as the same power however his 30 spearmen arent going to hold a candle to your 20 cavalry and 10 riflemen.
The next is planning. Make sure you have the enemy maps before you go to war. Each time I discovery a new resource I go looking for it in my neighbours and enemies. If its something important like iron, horses, oil or rubber I build a special strike force to pillage that on the first round if at all possible. Beyond this I try to have a line of units all across my border. This makes the AI know that you have forces on your border and might make him go look for a fight elsewhere. The side effect of this is that you dont get settlers running around your borders. So now you have a line of troops on your border, a key strike squad to run across and take away his important resource, its time to start thinking cities.
Taking cities is a trick in its own. Sometimes they can be consume a great deal of your troops knocking out the defends. You will then need your main strike force. I like to have this to be as mobile units as I have. The more the better. I place these strike forces along my border as close as I can to the enemy cities that I wish to take. Never go over the border until you have a complete game plan of what you want. If its a resource or a section of land that you want make sure you have more forces to take and hold that area. This will require atleast one of your best defensive units for each city you wish to hold and probably 2 or 3 of your best offensive units for each city you wish to capture. You may need to bump this up to 4 or 5 if you are going against a superior foe but in general I like grabbing land from my weak neighbours so I can build more and make everyone look small and weak.
Declaring war! Okay now you have your troops and your armies in place its time to pick a fight. There are two options, one you go across his border and break something right away. This allows you to get the 'sneak' attack and if you placed your troops correctly cause a great deal of damage. In one game I was able to take all my objectives ( 3 cities, one with a luxury that I didnt have ) in one round. Now if you cant obtain your objectives in one round you might want to let war start on his turn. This is one of the best choices if you have best defence around and he has railroads. Place your units in his land in the high ground ( mountains are choice ) and fortify. He'll ask you to move, bluff if you can or declar war. That round he will hopefully blunt the majority of his army with out having your weaker offensive forces being caught out open in the field.
I find this method of declaring war to be the best unless I think I can pull of wonders in the first round of war. Cause casualties in the hills with you defending with your infantry. The only time I have ever lost cities is when I stretch myself out thin and my 'last' cavalry takes a city and is taken back in a counter attack.
Once I have railroads I also like to give it to everyone. They love to pay lots of money for it. I give it to friends so they can quickly come and help, I give it to enemies so when their cities fall I can quickly use their railroads to get my cavalry and tanks into place to attack the next city in the same turn.
Now Im going to take a step back in the timeline and go back to the turn before you are going to step across the border. This is were you want to talk to your enemy and soften him up with diplomacy. You want to take as much as you can from him the turn before you attack him. Offer him luxuries ( be careful with other resources ) and non military tech and in exchange you want lump sums of gold and any tech you can get out of him. Now unless Im super buff I dont like going to war alone. If I can I want to get his neighbour on the other side to being my friend. Then I can get him into an alliance or a MPP this will make it so Ill have to fight about half as much which means Ill gain twice as much land
Now my key to winning the war. I have it all planned out, built up the troops, took all of his gold reserves in exchange for luxuries that are going to end the next turn, and have two MPP with his other neighbours the war starts and my troops move into a combat position and ready to attack this round.
I SAVE THE GAME.
I then fight the battle. If the battle goes well then I move the next group of troops into place and SAVE THE GAME. Fight the battle and repeat the process.
Now even the best laid plans sometime go wrong and random chance rears it ugly head and you take more casualties than you are willing to loose. Load your last save.
Now this is were one of the anomilies of civ kicks in. The best way I can tell is that at the beginning of your turn civ generates a massive amount of random numbers and then takes the top number off this list each time you attack. So if you save the game during your turn, go to battle, load the game and enter the same battle it will *always* turn out the same.
So now you have failed a critical strke and loaded your game. All the troops that did attack should wait out this round and wait one turn. Waiting one turn for an entirely new set of combat results is much better than spending 10 turns rebuilding your army

You may want to try attacking a different location as that city might be smaller, the defenders slightly different and while the same 'random' numbers are used, the results might be different.
Now you may want to skip my save/load abuse

However the AI has a crystal ball about my troop locations, Im going to use my crystal ball that tells me combat outcomes!
So now you have taken out a few cities that you wish to keep. First step is to station a decent amount of troops in each one. Then each turn I starve the SOBs. I keep turning everyone into entertainers, entertains dont seem to want to flip and well they arent bringing in food so Im purging the old unhappy populace. Once I knock the city down to 1 citizen I let it rebuild, and it will rebuild QUICKLY.
Now the war is over, you are happy with what you have gained. Sue for peace. Hopefully you are still in a strong enough position that you can take your enemy for everything you can during the peace process. Pay attention to what your advisor is saying and spend a couple minutes experimenting with his cities, technology, gold till you have taken him for all he is worth.
Now that your civ is at peace its time to BUILD FOR WAR. Start looking at the territory around your borders find out what is tasty. Find the high ground on islands near key cities etc. Rinse, wash and repeat!
Cheers,