Sado-masochisistic activities can be unlawful in the UK if it results in marks or injuries which are more than transient or trifling. A sore, red butt from, say spanking, would not fall foul of the law, but a knife-cut, leaving a scar certainly would.
If you do inflict serious marks or injuries, the particular offences for which you could be prosecuted are "assault against the person" or "aiding and abetting an assault". The fact that the parties consent to infliction of pain or injury is not necessarily a defence.
The issue was recently re-considered by the courts right up to the European Court of Human Rights in R v Brown. The case specifically involving a group of gay sado-masochists and resulted from a series of prosecutions following the infamous Operation Spanner.
At first instance the Court held that sexual acts that cause bruising or that break, cut, pierce or wound the skin; or that cause pain that lasts for more than a 'trifling or trivial' amount of time are classed as assaults against the person for which the inflictor can be prosecuted regardless of consent.
How long a "trifling amount of time" is, is not clear but probably a few minutes to a few hours at most. Note that if the person on whom the “assaults” are being inflicted pleads “consent” then they can be charged with having "aided and abetted an assault" upon their own body! Their consent will be the proof. If they plead that they did not consent - their partner will still be prosecuted - but they will be viewed as the victim of a sexual assault upon their person by their partner.
The case went to appeal in 1993 where the issue arose as to whether this type of activity might be permitted on the grounds of public interest in the same way that boxing is technically consensual assault but is in fact permitted. The House of Lords rejected the appeal ruling that sado-masochistic behaviour was not in the public interest. Lord Templeman said:
“The violence of sado-masochist encounters involves the indulgence of cruelty by sadists and the degradation of victims. Such violence is injurious to the participants and unpredictably dangerous. I am not prepared to invent a defence of consent for sado-masochistic encounters which breed and glorify cruelty and result in offences being committed”
In 1997 the case went to European Court of Human Rights where it was argued that that UK had violated the Applicants rights to privacy contrary to Article 8 of the European Convention on Human Rights. The court ruled that that state governments are entitled to regulate the infliction of physical harm and to determine the level of harm in consensual private sexual activities which they perceive as a threat to public health.
If you conduct your activities without causing wounding or enduring pain then you are acting lawfully. So for example candle wax, bondage, spanking or beating (which leaves no lasting marks) and all the milder masochistic pleasures are OK. Also fantasy sex, role play and dressing up are all fine. Anything more extreme remains illegal for both parties.
My advice is to moderate your activities if possible and stay within the bounds of the law. However, in the event that your activities for whatever reason become unlawful (by mistake or otherwise) then you can only be prosecuted if there is evidence. That evidence might be statements you make to the police or it could be letters or home videos. Bear in mind that the main evidence used in past prosecutions of this type, invariably have been home videos.
If you are arrested, my advice is simply say nothing and seek the advice of a solicitor. Be aware that technically there is no right of silence and the courts may draw an adverse inference if you fail to mention at the time of arrest something which you then later use in your defence. This does not mean you have to incriminate yourself. You are still entitled to say nothing and to invite the prosecution to prove their case.