Usually there is an iframe that drops a cookie on Expedia's (or whoever's) domain. The usual deal is the partner gets paid on any conversions within 30 days of dropping the cookie, with the newest affiliate winning, but there are also more complicated source attribution schemes out there.