This is rather a broad question that could be answered in a variety of ways.
To start at the beginning, the Parliament originally developed out of the monarch's court. In the early monarchy, the king (usually a king rather than a queen) would sometimes gather his court and discuss issues with them, asking for their advice. This was done informally.
As the nobles of the court got more power, this became a more formal arrangement and Parliament became something of an institution. Over the years, the kings were forced to include more people from a variety of backgrounds in the Parliament as power spread to people of other classes.
Parliament took more an more power from the monarchy over the years until (by the mid-1600s) Britain had a parliamentary or constitutional monarchy in which Parliament held a great deal of power.
Please follow the link for much more on this subject.