Particles of matter attract each other because of interatomic attraction force present between them. This force is maximum in solids as the constitutent particles of solids are closely packed hence they have maximum interatomic force.
What kind of particles attract each other?
Solids, liquids and gases are made of tiny particles called atoms and molecules. In a solid, the particles are very attracted to each other. They are close together and vibrate in position but dont move past one another. In a liquid, the particles are attracted to each other but not as much as they are in a solid.
There are some forces of attraction between the particles of matter which bined them together. The force of attraction between the particles of some substances is known as wonder wall force. Example - Iron piece, chalk, ice cube.