The Crown Prosecution Service's website is a useful place for legal guidance. The CPS can't determine what the law does or doesn't prohibit but their lawyers take on board the decisions of our courts (particularly of the higher courts, where precedents are set) and use those to advise their staff as to whether a prosecution should be considered (or whether such a prosecution would be likely to succeed). That advice to their staff is in the public domain, here:
https://www.cps.gov.uk/legal-guidance/public-order-offences-incorporating-charging-standard
(Scroll down to 'Section 5')
It needs to be remembered that what you can lawfully say (or, more likely, shout) at one person might be unlawful when said/shouted at someone else. For example if you tell a little old lady in the street that she's a c*** and that she should f*** off, you stand a good chance of being prosecuted for using abusive words "within the hearing . . . of a person likely to be caused harassment, alarm or distress thereby". However if you shout exactly the same thing at a copper (and only he hears it) you can't be thus prosecuted because a court has ruled that, due to the nature of his job, it's unlikely that a police officer would be greatly alarmed, or suffer any great level of distress, through what you shouted.