Terminal velocity occurs when an object in free fall doesn't accelerate any further. As F=ma, when a = 0, F must be 0. F in this equation refers to resultant force. Because all objects in earth's gravity have a downwards force on them of mg, then for there to be no resultant force, there must be a corresponding upwards force of mg due to air resistance.
So at the point where the force due to air resistance and the force due to gravity are equal, an object in free fall is at terminal velocity.