I have heard of transonic speed and it is between supersonic and not supersonic. What is it and why does it happen to aircraft and how does it produce a lot of drag. How do you prevent it from happening?
Airflow around aircraft and especially over wing is not uniform. The lowest transsonic speed is when the airflow at some point of aircraft (usually over wing) goes supersonic. Depending on aircraft, this happens around M0.8. When the airflow around entire aircraft is supersonic the transsonic region ends.
The excessive drag is due to the shockwave(s) that forms in the airflow at the location where airflow has accelerated to speed of sound. As airflow ahead of it hits the shockwave the energy of flow dissipates and there is sudden drop in air pressure across the shockwave. As there is less pressure behind the shockwave than there is in front of it additional drag is induced in the process. This called wave drag.
This effect can be counteracted by designing an airfoil that forms the shockwave initially as close as trailing edge as possible and then the entire airfoil goes supersonic as quickly as possible as speed increases. See https://en.wikipedia.org/wiki/Supercritical_airfoil
The formation of shockwave is the reason why supersonic aircraft has pointed noses as air is not pushed ahead of an aircraft. The pointed nose creates an oblique shockwave that has creates less drag along the aircraft flight path.
Pointed cones can also be seen in engine intakes of supersonic aircraft (see SR-71 and Mig-21). The additional oblique shockwave formed by the cone ahead of the engine is used to slow air entering the engine to subsonic speeds. The cone is moved back and forth as mach number changes to keep the shockwave away from the actual engine. Concorde used adjustable ramps within engine intake for same effect.