Earth and other planets attract objects towards itself with some force which depends on the mass and the distance between them. In most of the cases, we say that the object is being attracted towards the planet because of the size and the mass of the object is negligible compared to that of the planet.