I think the most fundamental aspect of Rousseau's philosophy is his understanding of "freedom". He considered this to mean the ability to conform to a rule we have given ourselves (even if we now don't want it). Is an addict more free if you give him open access to the temptation, or if you instead restrict him, thus helping him to achieve his ultimate goal of independence (from the addiction)? The classic example is of Odysseus asking his men to tie him securely to the ship's mast, so that he might resist the lure of the Siren's song. Thus Rousseau's seemingly oxymoronic notion of being "forced to be free" begins to make sense.
Rousseau begins with the observation that "Man is born free, and everywhere he is in chains". Rousseau identifies this as the "fundamental problem" which political theory must explain: how can you create a community which protects all its members, yet leaves them all as free as they were before? He does recognise the need for such a community: natural liberty can only be enforced so far as your individual strength permits, whereas civil liberties are backed by the might of all. We give up our natural liberties in order to gain civil liberties, and Rousseau considers this a (better than) fair trade.
So how is our freedom maintained? Rousseau suggests that this is possible due to what he called the "general will". People are capable of considering matters from various perspectives. Our usual perspective is that of self-interest ("me"), and this gives rise to our private will. But we can also consider matters from the perspective of the citizenry generally ("we") - and it is when offering opinions from THIS perspective that we contribute to the general will.
The key idea is that when people join together into a community and legislate to enforce their common interest (i.e. the general will), then each member has done nothing more than provide himself with the laws he wishes to live by. And this, as discussed above, is precisely what Rousseau believed was 'freedom'.
An idealisation of this process can perhaps be seen through the famous "Prisoners' Dilemma". If each individual pursues their self-interest, then both are worse off than they would be if only they could both somehow be forced to co-operate (the cost of being exploited is too great for either to risk altruism without the guarantee that it would be reciprocated). In this situation, their common interest is in BOTH participants co-operating, and so the "general will" would advocate some sort of imposition (e.g. a law, backed by harsh penalties) to ensure that both did co-operate after all. Given such an idealisation, I would agree with Rousseau that (necessary) force has indeed led to each individual's maximal realisation of freedom.
But the real world is not so simple. In this case, both individuals were perfectly equal, and had equivalent and aligned interests. But what about conflict? How does the general will arise from a diversity of interests? Certainly it is not mere majority-vote: such could lead to exploitation of minority interests. Rousseau recognises this, and insists that the general will is concerned with the "common interest" only, whereas the majority will is merely the sum of particular private interests.
Rousseau suggested that the former may be derived from the latter: if you cancel out the various positives and negatives, then the general will remains as the "sum of the differences". Exactly what is meant by this, is not entirely clear, but here is my analysis: Private wills come into conflict when you have one person wanting to benefit at the expense of another, by means of act X. When you consider their wills collectively, then, you will find that the (positive) benefit of X perceived by one will is tied to the (negative) expenses faced by the other. In such cases, what you need to do is cut out X entirely.
This is simple enough when the costs and benefits are balanced. But what if the benefits (to one person or group) outweigh the costs to the other? Do we still cancel them out of the general will entirely? Ultimately, yes. Rousseau insists that "every authentic act of the general will, obligates or favours all the citizens equally". Just because something benefits you more than it costs me, does not mean that it is in any way in my interest. And if it is not at all in my interest, then it cannot be in OUR "common interest". And if it is not in our common interest, then it is no business of the general will. Thus minorities are well protected from exploitation by the general will (at least in theory).
Slightly more dangerous though, is Rousseau's implication that minorities may be mistaken about the general will. The general will is what is best for everyone (by definition), yet we don't always know what this is (obviously enough). If everyone truly wants the general will (whatever it turns out to be), and the majority knows what it is (a dangerous assumption!), then by forcing minorities to follow the majority decision, the minorities are simply getting what they "really" want! This reasoning might work if only we had some sort of reassurance that the majority really do know what's best, but I'm far from convinced that this is the case.
It is an important aspect of Rousseau's theory that everyone remains equal under the social contract. Rousseau's theory requires the "total alienation" of us and all our rights, to the community. From here, Rousseau makes the stunning assertion that "each, in giving himself to all, gives himself to nobody" and argues that because we (as a member of said community) gain the same rights over everyone else that we ourselves gave up, we thus "gain the equivalent of all we lose". This is quite an important point, I think. Not only do we retain our freedom (though exchanging natural liberty for civil liberty), but we also retain our natural equality with all others. There is no individual person (eg the monarch) invested with the role of 'sovereign', which is a notable improvement upon past Social Contract theorists (like, say, Hobbes). The rights of the people (individually) become the rights of the people (collectively). In this respect, observing that we've given ourselves to "nobody" makes a certain kind of sense.
To finish up, it is worth observing the limits to the general will. We've already noted that it must always treat all citizens equally. Furthermore, the general will can never apply to any particular object or individual (this is why the executive/government is necessary - to apply the general laws suggested by the general will, to particular instantiations). Finally, in the original social pact, citizens only alienated those rights "whose use is important to the community" (I'm not sure how Rousseau reconciles this with his earlier notion of "total alienation" though!). So the general will would never be able to co-opt individual rights which are of no practical import to the community at large.