How they can redirect on google Serp without punish

I found one black hat niche,on the google first page serp,there are many websites that shows domain A in the page,but when click the link,it will redirect to domain B ,it sure not 301,because the domain A stay long time on the page,how they can do this,any one can share your tips???