Constitutionally an MP has no power of voluntary resignation. Death, elevation to the peerage, dissolution or expulsion are the only causes (apart from legal disqualification) by which an MP's seat can be vacated. Therefore an MP wishing to resign must disqualify him or herself. One cause for disqualification is holding a paid office of the Crown. There are two that the MPs use. The first office is the Crown Steward and Bailiff of the Chiltern Hundreds (Stoke, Desborough and Burnham) and the second office is the Manor of Northstead. An MP wishing to retire applies to the Chancellor of the Exchequer for one of the Offices that he or she retains.
Further information on this subject can be found from the following links.
House of Commons Library Briefing: Resignation from the House of Commons
By-elections since 2010 General Election