How did someone find out my internet history?

I found out that someone knows everything I have downloaded from the internet to my pc and iphone. Anyone know how they could have done that? Also how can i prevent this in the future?

Added (1). Also, they did this remotely without physical access to my pc or iphone.

Get a girlfriend Jeff.

They probably went to your search history, if you don't want people to see that you can simply delete it.

They either went on and saw your history or they contacted your phone user such as AT&T to find out your history even if it was deleted.