If the dog poses an immediate threat to the safety of the public then it can be lawfully ordered to be destroyed by the police or other responsible person (e.g. a vet/local authority). This power comes from the fact that a dog is classed as property and it is lawful to humanely destroy it, if it is causing immediate damage/danger to people, animals or property.
If the dog has been established as dangerous but does not pose an immediate threat to the public etc., the court can order its destruction (whether or not there has been a prosecution conviction of the owner/keeper) and the court can also disqualify its owner from owning a dog in the future.