O2’s best prepay plan for visitors is called Pay & Go Go Go. The prepaid bundles depends on how much you top up. Add £10 credit for 75 UK talk minutes (to UK cellphones and fixed lines), 500 texts, and 250 MB of data, valid for a month. Top up with £20 and receive 250 minutes, 2500 texts, and 500 MB of data, valid for a month. For more data, add a Web Bolt-On: add 500 MB to any tariff at a cost of £6, or add 1 GB for £10. Both also include free Wi-Fi access at the countrywide BT Wi-Fi network.
Prepaid SIM cards are anonymous in the UK and unregistered, though some providers may want you to sign up with them. But this is only to link your SIM card to your online account. You don't have to specify any personal details, but your email address and set a password.
Prepaid is usually called "pay as you go (in short: PAYG)" in the UK. This survey starts with all 4 network providers to be followed by their most significant resellers or MVNOs on the market.
Prepaid SIM cards in the UK are delivered with a so-called "Content Lock" in place. This is to protect children from accessing adult content. The problem is that a white-listing approach is used for this, meaning that everything that has not been actively approved as non-adult will be treated as "adult".
This can seriously interfere with your internet accessibility, e.g. some users could not use their instant messaging services. Even emails and all "unguided" forums like Facebook or Twitter can be affected. However this can be bypassed using a VPN or proxy app/software to conceal your identity
The usual way to disable the content lock is to enter credit card data to prove your age; but this only works with UK-issued credit cards, and as a tourist you probably won't have one of those. Therefore when you buy a new SIM card in store insist that the lock will be removed right away (what takes one minute). For this you may need to provide some form of ID to prove your age, if you look young.
If you don't mind to buy one debit card to top-up another, you can order a Revolut MasterCard worldwide and use it to recharge all UK SIM cards online. This card is confirmed to work as UK-issued. Also you can try to buy UK prepaid gift cards and use them for recharging.
What type of phone ?