Aerospace engineering deals with designing and building machines that fly. It is one of the newest branches of engineering, and began in the 19th century with the first experiments in powered flight.
As technology progressed, two specialties emerged; aeronautical engineering, which involves designing aircraft such as powered lighter-than-air craft, gliders, fixed-wing airplanes and jets, autogyros, and helicopters; and astronautical engineering, which focuses on the design and development of spacecraft.
In other words, aeronautical engineers are primarily involved in designing aircraft that fly within Earth's atmosphere, while astronautical engineers work with the science and technology of spacecraft that fly outside Earth's atmosphere.
Aerospace engineering, particularly the astronautics branch, is often colloquially referred to as "rocket science".