Regardless of the circumstances and legalities, it is always worth trying. After all, it is in the interests of retailers and restaurants to keep their customers happy, and many will go to surprising lengths to do so. A quiet word with a member of staff, briefly pointing out that the wine just isn’t to your taste, may be all that’s required to secure an alternative or a refund. But your chances of success will be determined by a number of considerations.
The first of these is the reason you don’t like it, and the reason you don’t like it may be that it is faulty. You shouldn’t need to go into detail - shops and restaurants should offer a replacement (most shops would also offer a refund) - so just saying you don’t think it tastes right will be enough. In the UK, you have statutory rights under the Consumer Rights Act 2015 and the most relevant of these is that goods must be fit for purpose. But if you’re interested in knowing more in order to support your claim, the most common faults are corkiness (a mouldy, damp cardboard smell indicating that the wine has been tainted by TCA either in the cork, if it has one, or some other contact in the winery), oxidation (smells unpleasantly nutty, vinegary or like a sherry), brettanomyces (a barnyardy, horsey, faecal aroma caused by a bacterial problem), excessive sulphur (the smell of a struck match) and the presence of sulphides (a bad egg aroma).
If you don’t think it’s faulty, but it’s just either not very good or really not to your taste, then the circumstances of purchase come into play. The majority of wine merchants, online wine retailers and supermarkets have an explicit “no quibble” refund policy for customers who don’t like a wine, and even those who don’t advertise such a policy may nevertheless operate one. Just tell them you don’t like it and return the opened bottle (if necessary) along with any unopened ones. They may ask for your reasons not through scepticism but simply because they find the feedback useful. You shouldn’t even need to provide a receipt, but some proof of purchase may smooth the path to a refund.
Many restaurants will replace a wine if you don’t like it, but it is less clear-cut here and will depend on the restaurant’s policy and the value of the bottle. Do tell them immediately - especially if you are asked to taste it when it is brought to the table - rather than after most of the bottle has been poured out and drunk, as it strengthens your case and also gives them the chance to sell the rest by the glass to other customers. And in the unlikely event that your polite request for an alternative is met with unapologetic intransigence, don’t let it ruin your evening. No bottle of wine is worth that.