There are two types of drone piloting, commercial and hobby. If you're looking into flying a drone for hobby purposes only then this will guide you on the information you need to know before taking the drone off. For Hobby purposes there is no legal requirement for any training necessary, you're able to just take off the ground after purchasing your drone, but the drone code will always still apply to you. Although flying lessons would be an intelligent move for any new drone pilot. Gaining those extra skills can help you avoid ditching your drone and paying the price with a repair. If you're looking to move into being a commercial drone operator then you will need to contact a certified organisation that can help you develop an operations manual and check you match their requirements. There are numerous amounts of business' that host courses for commercial operation assessments which are CAA approved.
When buying a drone straight from a store you can setup it up and fly away, but, there are restrictions. Flying a drone with hobby purposes you will need to take these regulations into consideration:
Flying commercially has a much more restrictions as the drone your piloting needs to be registered and permit to fly will need to be issued from the CAA because it would be classed under aerial work: