We've had a couple of pet cows for years - they're fab, do it if you can, but please don't just keep one on it's own.
Assuming you're in UK, just need to make sure that the land you own has a Holding Number, then get a Herd Number (Defra I think) and inform the Local Council and IIRC the Trading Standards, get registered with the British Cattle Movement Service and a vet and you're good to go.
You'll need about 3 acres to graze two cows throughout the year. More is the grass is rough, less if they're housed in winter.
It's up to you to fence your animals in, not for others to fence them out and obviously you need a water supply to a trough and some sort of shelter and shed to store feed and bedding etc.
You'll need to check if your land is in a Nitrate Vulnerable Zone as this will affect how you store manure/muckhill and how much can be applied to your land and when.
You need to have someone who knows what they're doing, my DH is an ex-dairy farmer - assuming if you have the land, you also have farming neighbours to ask. Also bear in mind that they'll need checking everyday when you're away, and bad shit always happens at inappropriate times.