It not a secret that Facebook collects information about its users and so does Google, Twitter etc. for its research to improve experience.
Facebook is free to use, but in exchange for that service you are allowed to track your activity so that advertisers can find yo to show the stuffs you will or want to buy. Facebook has been accused of tracking users about their online behavior by putting tracking cookies, and software to show ads that is relevant for users.
So when you search on web for any vacation trips, Facebook starts showing hotel and Travel deals ads, or if you visited any mobile phone websites, Facebook will show ads relevant to that mobile brand.