It works like this: the user selects the channel it wants to rebalance, a channel with available outbound liquidity to be pushed somewhere else, and the amount that will be moved. Then the node will try to find a circular path between the two channels. If it can do so, it will then send a payment to itself through that circular path.