I am traveling to Paris via Ryanair from Copenhagen and there is a 9 hours layover in London, UK. I am planning to go out of the airport for 3 or 4 hours to visit the city during my layover. Do I need to have a transit visa or a general tourist visa, or can I simply go without a visa? I have a residence permit of Denmark. I am from Nepal.
This question will tell you how to find out if you need a visa.
However, something seems a bit weird here. There aren't any Ryanair London - Paris flights that I know of - according to their website you can only fly from Manchester to Paris (Beauvais). The Copenhagen flights go to London Stansted and London Luton, both quite a long way from Manchester. Are you sure these flights are going through the same airport and there isn't an error somewhere?