Parliament has it roots as a feudal assembly. Medieval kings ruled by commanding the loyalty and support of the nobles and other powerful groups, not by the sort of direct power that 17th and 18th century absolute monarchs wielded. If a King alienates too many of his subjects, he tends to find his orders ignored, or he may even find himself overthrown. Of the 28 Kings of England between the Norman Conquest and the English Civil War, nine were overthrown (Matilda, Edward II, Richard II, Henry VI (overthrown twice), Edward IV, Edward V, Richard III, Jane Grey, and Charles I) and at least five more faced rebellions that seriously threatened their overthrow (Stephen, Henry II, John, Henry IV, and Edward VI), not counting the assassination attempts against Elizabeth I and James I.
Parliament was created and used as a tool to get buy-in from major power centers for the King's policies. Better to have your proposals voted down than to risk losing your crown and your head by forcing them through and triggering a rebellion.
The structure of Parliament reflects this: the House of Commons represents powerful/influential commoners in the cities and the countryside, and the House of Lords represents the landed nobility and the leaders of the Church. Any proposal subject to Parliamentary approval needs the approval of a majority of both houses, plus the King's approval. Approval of Commons indicates that a successful popular revolt is unlikely, and approval of Lords indicates that a successful revolt by the Aristocracy is unlikely.
The pre-Great-Reform structure of Commons districts reflects the idea of Parliament as a tool for getting buy-in from interest groups rather than as a true democratic body. Member of the House of Commons came in two flavors: Burgesses (representatives from each city or town) and Knights of the Shire (representatives from the rural areas of each County), and each town or county got two Burgesses or Knights regardless of population.
Originally, the House of Lords was the more important body, as this was the primary power center, and as individual Lords generally wielded enough influence that the commons MPs generally followed their leads. This gradually shifted as the age of gunpowder made the nobility less important as a military caste, and as the rise of commerce and manufacture reduced the economic dominance of the landed gentry. The War of the Roses, the Tudor campaign to break the power and independence of many of the big noble families, and the English Civil War also wiped out a number of major noble lines and left the rest weaker and more dependent on the Crown's favor. The English Civil War in particular also demonstrated that the militia and professional military (who generally aligned with the House of Commons) had become more important than the aristocratic/feudal military that generally aligned with the Lords.
By the 16th and 17th centuries, Parliament's role was largely centered on the power of the purse. The Crown needed continuous sources of revenue beyond feudal dues and the income of the King's personal lands, Parliament has firmly established that its consent was required to pass tax laws, and Parliament consistently refused to authorize taxes on a permanent basis. So Kings needed to call Parliaments periodically to get taxes re-authorized, and each Parliament would use their authorization of revenue as a bargaining chip to get the King's consent for policy changes requested by Parliament.
In the 18th and 19th centuries, the Crown's role became increasingly hands-off, and Parliament spent more and more time in session and took an increasingly active role in shaping and directing policy. By the reign of George III, the post of "Prime Minister" evolved. Formally, the Prime Minister's job title is "First Lord of the Treasury", i.e. the senior member of the commission that jointly exercises the ancient role of Lord High Treasurer. Informally, he's the executive official in charge of fiscal policy, particularly trying to formulate and negotiate policies that will command the support of the King and a majority of both houses of Parliament. The role started out as someone chosen by the King to get his preferred policies through Parliament, but a Prime Minister who can't command a majority in Parliament for his policies is useless, so the tradition rapidly evolved that a Prime Minister must resign if he loses a vote of confidence (either an explicit vote of "yes, we support the PM", or a major policy vote). This in turn evolved into the tradition that the PM is the leader of the majority party in the House of Commons, since that's the best person to command a majority.
If you want to get a good feel for the actual operations of the 19th century Parliament and their relationship with the Crown, I'd recommend starting with the wikipedia articles on William Gladstone and Benjamin Disraeli. It doesn't explicitly describe the legal theory, but the narratives do convey a good feel of how things actually operated.