An aircraft without an engine, even if it's supposed to have one, is a glider. If an engine quits, for example, the most common cause is because the pilot ran out of gas. In other words, flying is as safe as you make it. How to fly safely, and to deal with the rare emergencies that are beyond the pilot's influence, will be covered in your training. Pilots earn certificates, not licenses.
Students work toward either a recreational or private certificate.
While the training for both is the same, the recreational certificate is designed for fun flying close to home during the day only. In other words, rec pilots don't need or get training private pilots must have for flying at night, cross-country, and at airports requiring communication with air traffic control. Recreational pilots can earn a private certificate when they get training in these areas. Once you earn a private certificate, you can move up the ladder, if you so desire, to a commercial certificate, which enables you to fly for hire. A flight instructor certificate enables you to teach others to fly, and an airline transport pilot certificate is needed to captain an airliner.