The Constitutional framework of the UK is a combination of laws, traditions and conventions. The central principle of the constitution is "Parliamentary Sovereignty". It was established, by the deposition of James II that Parliament has the power to remove a monarch, and to choose a successor. It is, therefore, reasonable to believe that Parliament also has the right to end the monarchy. A simple Act of Parliament would be sufficient.
Such an act of parliament would formally need royal assent. However the convention is that the Queen acts only on the advice of her Ministers, and she could not personally choose to not to sign. As JBentley points out the requirement for the monarch not to refuse royal assent is a convention and as such not legally enforceable. Conventions do evolve over time with old ones being ignored, and new ones coming into effect. A convention is only as strong as the will of the political actors to abide by it.
A referendum could be called by Parliament. Major constitutional changes are often decided by referendum, and so this becomes a tradition.
There would be a lot of loose ends. For example, would an elected President take the role of the Monarch? This would be a simple arrangement, as the various reserve powers of the Crown could be passed to the President. If there is to be no replacement then things like the oath of loyalty that soldiers swear would have to be changed.
There would also be the large amount of property that the Crown owns. The act would need to establish what is owned by the Queen, and what is owned by the Country.
The example of James II is that the King was not able to prevent the will of Parliament. However this was ultimately an act of force. William was able, with the support of Parliament, to take the Throne, and James was unable to raise a sufficient army to prevent it. If the monarch chose to reject the decision of Parliament, then there would be a de facto state of civil war.
The final decider of what is constitutional is the question of who can defend their position by force. If a monarch has sufficient support, especially in the armed forces then they don't need to agree to anything.