There are some differences in vocabulary and idiom across the British Isles, and you might encounter some regional words and expressions that you're not familiar with. But the core vocabulary and grammar are not hugely different, and you might find that a bigger problem is pronunciation. If you're only familiar with the sort of English spoken by middle class people from the south of England, and you go into a pub in a rough part of Glasgow, say, then you might not even realise that the people there are speaking English at all.
The native speakers I (as a native speaker myself) have most difficulty with are young urban working class people. In this case, vocabulary (lots of "yoof slang" I've never heard of) and pronunciation both cause problems. I might overhear, say, a group of youths chatting in a London suburb and only catch about 50% of it.
There's no need to try to speak regional dialects of British English yourself (unless you're particularly interested in doing so, of course). If you speak something approximating to "standard" British English then you should be able to make yourself understood anywhere in the British Isles.