When the bypass valve is in the normal position, it lets hydraulic power from the flap control valve go to the TE flap hydraulic motor. When the bypass valve is in the bypass position, it connects the hydraulic lines on both sides of the hydraulic motor to each other.
This stops operation of the hydraulic motor, prevents a hydraulic lock, and lets alternate flaps operation backdrive the hydraulic motor.
Hope this helps.