Stems from winning books or tricks in cards. It means to trade in a winning for collateral, usually sexual favors or prostitution.
Do you have Wendyâs number? I need to turn a trick tonight.