The phenomenon of "weightlessness" occurs when there is no force of support on your body. When your body is effectively in "free fall", accelerating downward at the acceleration of gravity, then you are not being supported.
What causes weightlessness?
To create the sensation of weightlessness, the pilot sets thrust equal to drag and eliminates lift. At this point, the only unbalanced force acting on the plane is weight, so the plane and its passengers are in free fall. This is what creates the zero-g experience.
What is weightlessness and when does it occur?
The sensation of weightlessness, or zero gravity, happens when the effects of gravity are not felt. Technically speaking, gravity does exist everywhere in the universe because it is defined as the force that attracts two bodies to each other. But astronauts in space usually do not feel its effects.