Ballot Bills are Private Members' Bills that receive the first opportunity for Second Reading (when the general provisions of the Bill are debated and voted for approval) . This privilege is awarded through a lottery of backbenchers. A new lottery is held for each Session of Parliament.
The order in which business is listed on the Order Paper is the order in which the events of the House must occur. The number of Private Members Bills listed on a Friday Sitting vastly exceeds the six hours available for debate. Therefore, being first or second on the Order Paper is crucial to having your Bill progress.
For a Private Members' Bill, if not debated on their chosen day, the Bill must go to the back of the Order Paper on a future date.
In practice, not being debated on the initial day amounts to a total defeat of a bill.
As with most events in Parliament where demand vastly exceeds supply (such as asking questions to Minsters), a lottery is held to determine the allocation.
Two weeks after a Parliamentary Session has begun, the lottery (or 'ballot') occurs for backbench MPs. Under the supervision the Deputy Speaker, an employee of the Houses of Parliament draws 20 balls with the names of Members from a bowl. The order in which the balls are drawn determines the precedence for MPs when presenting their Bills.
Three weeks after the ballot, the 20 winners have their Bill first reading. No other Private Members Bill may have a first reading before this time.
At the first reading, the backbencher names the day for the Second Reading, and provides the short title and summary of their bill. If they are the first to claim a day, their bill will be first on the Order Paper. Generally the slots are filled from soonest to latest, to ensure being first on the chosen day.
Those MPs with a high position on the ballot are in the strongest position to advance their legislation, and are inundated with appeals from organisations that wish to advance their cause.
The precedence of Ballot Bills extends only to their Second Reading. There is no further precedence to Ballot Bills beyond this point.
UK Parliament Glossary: Ballot Bills