How google, Amazon, and apple collect information

How do google, Amazon, and apple collect information on you and their other customers. and what do they do with it?