all I did was close down a few pages that had opened up by themselves,
Do you have any 'Free' apps on your phone?
These will be ad supported by pop ups, so closing them before reading them may have subscribed you.
To prevent the £4.50 charge would have cost you 10p to send the stop message when you received the initial subscription text, there is usually a 24hr lag between the text arriving and the subscription taking effect.
The idea that consumers can be legitmately signed up to a subscription service by closing a pop-up is a myth. The Phone-paid Services Authority require that consumers be shown a 'landing page' with a button clearly labelled with something like 'Subscribe for £4.50/Wk'.
After pressing this button a 'confirmation screen' must be displayed, once again making it clear that the subscription will be charged to the user's phone account.
When the Phone-paid Services Authority investigates a service, they will ask for 'proof' that these screens were correctly displayed. Unfortunately, scammers have found ways of making it appear that the correct process was followed.
Apps that display pop-up ads are perfectly legitimate. However, anything that signs you up to a service by closing a popup is malware. Unfortunately there have been numerous reports of 'WAP billing malware' in the past year. Googling this term will provide more information. Do you know which App was responsible for the popup?
If you become subscribed to one of these scams, it is better to phone them than to text STOP, as texting STOP can be miscontrued as meaning that you accept the subscription was valid. This can make getting a refund more difficult. When you stop the subscription by phone you should still receive a text stating that the subscription has been stopped. If you don't get this, ask for it.
Actually, only a few of these 'services' allow a 24hr 'cooling off' period. The vast majority do not, and there is no legal requirement to provide one.