In the courts
The petitioner may seek a legal remedy if the state or another private person has acted unlawfully. In this case, the petitioner, often called a plaintiff, will submit a plea to a court to resolve the dispute.
To the government
On the other hand, the petitioner may be complaining against the law it to "... make no law... abridging... the right of the people peaceably to assemble, and to petition the government for redress of grievances".
A petitioner need not seek a change to an existing law. Often, petitioners speak against (or in support of) legislative proposals as these progress.
The Whig party
A group of 17th century English politicians became known as Petitioners, due to their support of the Exclusion Bill, a bill which would prevent the succession to the throne of the Catholic James, Duke of York, the heir apparent of King Charles II. After the House of Commons passed the Bill, Charles dissolved Parliament; when a new Parliament was elected shortly afterwards, Charles simply refused to summon it to meet. The Petitioners got their name from the many petitions they sent to Charles urging him to summon Parliament; they were opposed by the Abhorrers, who resisted the Exclusion Bill and were in no hurry to see a pro-Exclusion Bill Parliament meet. In the heat of the dispute, the two factions traded insulting epithets; with the result that the Petitioners became known as the Whigs and their opponents as Tories.