how does affiliate and network marketing work