I have seen some websites have intext ads in their content which goes to my facebook homepage? Can some one explain the steps how its possible?

This looks like intextual.com to me. Since it's commercial ware, they should answer your queries.