I just have a simple question, what happens when a country wins a war: will that country rule the losing country, or what happens after the war?
War is not a game. There is no specific thing that happens when a country "wins" a war.
When a war ends, it's either because
there is only one side left, and the other sides are completely annihilated or rendered completely unable to fight somehow. In this case, yes, the victorious country gets to do pretty much whatever they want with the other country.
the countries ended the war based on some sort of agreement The winner can be said to be the one who got the more favorable side of the bargain. In this case, what happens is whatever the terms of the agreement are. Maybe the "victorious" country demands money or resources, or maybe they just agree to stop the war, because it results in too many losses on both sides.
Of course there are a lot of political and humanitarian elements involved, so even if one nation wipes out the armies of the other, they might suffer political consequences from other countries if they don't take responsibility for the destruction that they've caused.
Not necessarily - at the end of both World War I & II, for example, Germany was temporarily occupied and forced to pay reparations, but the country's sovereignty was never questioned. Even when Germany was divided in 1955, it was considered a sovereign state.
"War therefore is an act of violence to compel our opponent to fulfill our will."
The point of war is simply to force another sovereign entity to do what you want - the casus belli.
In Syria, for example, the United States wanted chemical weapons gone. So, it threatened war, and when Syria (sort of) capitulated, actual fighting was averted.
In Afghanistan, the United States demanded that the Taliban stop aiding terrorists. The best way was to invade and drive them out.
And, in Panama, the United States wanted the President - Manuel Noriega - to go to jail for drug crimes. The soldiers invaded, Noriega was captured, and the US went home.
Diplomacy is better than war, because fewer people die, and less is destroyed. But in the end, all of it - war, diplomacy, the UN, and treaties - are simply the means by which nations alternately woo and coerce other sovereign entities to do what they want.
It mostly depends on why the war was fought, and what the result was. I'll use some American examples.
In the American War of Independence, America fought (and won) a war with Britain for the right to be independent. America never wanted to attack or conquer Britain, all it wanted was for Britain to "get out" of the US. When Washington trapped Cornwallis' army at Yorktown, the British decided that they didn't have enough men left to conquer the Thirteen Colonies, so they made peace.
When America fought and won a war with Mexico, America wanted to occupy a large stretch of (almost) empty land between Texas and California, inclusive. America made peace as soon as Mexico agreed to give up these territories. American didn't want to conquer and rule the Mexican people, who spoke Spanish, not English.
During the Civil War, the North defeated the South, which was trying to break away from the US. Yes, this was a case where the winning country fought to rule the losing one. If the South had won, it would have been for their "independence" but not to rule the North.
Then America fought and won two World Wars with Germany as a preventive measure, to prevent Germany from conquering other countries.
There is only one legal way to wage war under international law, enforced by the UN. That is in self defence, and when the war is concluded by ending the threat everything must be returned to the prior state, including the losing side retaining sovereignty and self-governance.
On the other hand, illegal wars can result in any outcome, although the UN will typically try to enforce international law as far as possible.