Ofcom's Broadcasting Code governs what can be aired on TV and radio.
It is the rule book for TV and radio stations and sets standards for programmes which broadcasters have to follow.
The Code exists to protect viewers and listeners from harmful and offensive content but also ensures that broadcasters have the freedom to make challenging programmes.
For example, broadcasters can transmit provocative material – even if some people consider it offensive – provided it is editorially justified and the audience is given appropriate information.
As well as harm and offence, the Code covers other areas like impartiality and accuracy, sponsorship and product placement as well as fairness and privacy.
The Code came into force in May 2005 and was initially drawn up to replace the codes Ofcom had inherited from its predecessors – including the Broadcasting Standards Commission and the Independent Television Commission.
It had to take into account the dramatic changes that had affected TV and radio. The UK was no longer a country with just four or five TV stations and the majority of homes now had access to many more digital TV and radio channels.
The Code was drawn up following extensive research amongst viewers, listeners and broadcasters – and we received more than 900 responses to our public consultation.
Since 2005 the Code has been revised on a number occasions, including clarifying rules around audience competitions and voting, the broadcast of sexual material rules and product placement.
The rules for regulated video-on-demand services cover material which is prohibited or restricted due to its adult nature or incitement to hatred, as well as product placement and sponsorship.
There's a whole section of the Broadcasting Code dedicated to protecting children from unsuitable content on TV and radio, including rules about the 9pm watershed on TV.
There are also rules about the times broadcasters choose to schedule their programmes, as well as restrictions on programmes broadcast before the watershed that include offensive language, violence, sexual material, and dangerous or harmful behaviour that children might try to copy.
The video-on-demand rules protect children from "specially restricted material", which is material that has been or would be classified in the R18 category by the British Board of Film Classification (BBFC)) or other material which might seriously impair the physical, mental or moral development of under-18s and "prohibited material" which has been, or would be, refused a classification by the BBFC).
Whenever viewers and listeners complain to us about a programme they've seen or heard, we assess it against our codes and rules.
If we find a programme has broken those rules, then we will write a decision recording the breach.
These decisions are published on our website in the fortnightly Broadcast and on-demand bulletin.
If a broadcaster or on demand provider seriously or repeatedly breaches our rules, we have legal powers to impose sanctions.
This could be a substantial fine, suspending a video on demand service or taking away a TV or radio broadcaster's licence to broadcast.
All of our sanctions decisions are published here.