It does surprise me the number of people that will turn up to do some work on a farm without notifying or discussing their intended presence with the farmer. It allows the farmer, if he so chooses, to adapt his routine, or move his livestock, so as to accommodate them. After all, you would not expect someone to walk into a private garden or property area to examine or work on something without informing the owner of their intentions.
Generally, people have right of entry into a farm property only to and from access to the farm dwelling house(s). A farm dog is not permitted to prevent such access, and if considered a potential threat must be suitably housed or restrained when in that area. Should such a dog attack a person legitimately approaching the farmhouse door, then the dog can be put down by the police.
But remember a dog is a territorial animal and in many cases is only seeking to protect his home, and simply allowing a little time for a loose dog to recognise that the intruder is no threat is sufficient. Stand still, face the dog, and allow it to approach to check you out. If you have to retreat, walk backwards, and do not turn, and never run. If you find yourself facing a madly barking dog, stand still and do not go forwards. The dog is summoning assistance, and you have to hope it will be the owner, and not another two Alsatians, that arrives first!
The public has right of entry into a field with a rights of way through it, and a farmer is not allowed to have a dairy bull in such a field, and should not have cows with young calves at foot or cows about to calf. A beef bull is a much more placid animal, and can run with cows in such a field provided he is of "no known aggression".
Other fields have no right of public access, though there is a plethora of professions who have, or may consider they have, rights of access, such as electrical companies, waterway companies, land agents, shooting syndicates, highway surveyors, wind farm operatives, etc. These may well encounter potentially dangerous cattle.
A bull may well decide to protect his herd from a potential threat, and if a bull appears to be taking a lot of interest in your presence, then slowly withdraw from the field. If entry into such a field is a must, then enter in a vehicle such that there is a "safe haven" to withdraw to. The bull may well decide to wreck the vehicle, but at least you should be safe inside.
A cow with a young calf, or one about to calf, is extremely protective of its young, and may well see a person as a potential predator. Often a dog is involved, but not always. An alarmed cow will bellow for assistance, so summoning the survival instinct such that the whole herd will come to her assistance with the intention of surrounding and trampling the "predator".
If faced with a herd of bellowing cows racing towards you, and you think you have enough time to get back out of the field, or behind a tree, or back to the vehicle, then run like hell. If not, then do not run, but face the herd, and raise your arms to make yourself as big as possible. Shout like crazy to scare off the herd, and to summon help. If you have a dog, let it go, and send it away, do not let it hide behind your legs. The cows will be intent on trampling it and will trample you in the process. If you have a small dog, pick it up, and this sometimes diffuses the situation immediately. Should you have a stick with you, then smack the nose of the leading cows really hard. It is your only chance of halting the leading animals before the herd arrives and the situation is out of control.
If you find yourself being the centre of attention of a group of young cattle, then they are probably being purely inquisitive, and are no potential threat. They simply want to accompany you, and will follow you around their field.
I was a dairy herd manager for 10 years and a HSE inspector for 20 years.
The two times an entry was made for me in the HSE accident book was due to be bitten by farm dogs. On one occasion the farmer's wife was seriously objecting to my right of entry, and the collie decided she clearly needed assistance, and came up to me from behind and bit into my right leg! She asked what would happen now, only for me to inform her that I would have to inform the police. She disappeared to find her husband and I was escorted around the whole farm with no further bother.
Sadly, I have had to investigate some serious cattle accidents, with some involving fatalities to farmers and to the public. However, one accident report that remains in my memory was of a wind farm operative who found himself suspended on his rope and being violently swayed around such that he found himself being smacked back and forth into the vane. A small herd of cattle had passed underneath and had caught the end of his rope around the leg of one of them!