If dark matter has gravity just like normal matter, does that mean it can also form planets, solar systems and so on? Any answer will be appreciated.
Planets and stars, no. Globular clusters and galaxies, yes.
To condense into such relatively compact objects as planets, stars, and even the more diffuse star-forming clouds, particles need to be able to dissipate their energy. If they don't do this, their velocities prohibit them from forming anything.
"Normal" particles, i.e. atoms, do this by colliding. When atoms collide, they're excited, and when they de-excite, they emit radiation which leaves the system, carrying away energy. In this way, an ensemble of particles can relax into a less energetic system, eventually condensing into e.g. a star. Additionally, the collisions cause more energetic particles to donate energy to the less energetic ones, making the ensemble reach thermodynamic equilibrium, i.e. all particles have the same energy on average.
Dark matter is, by definition, unable to collide and radiate, and hence, on such small scales as stars and planets, particles that enters a potential well with a given energy will maintain that energy. They will thus accelerate toward the center, then decelerate after its closest approach to the center, and finally leave the system with the same energy as before (if it was unbound to begin with). This makes it impossible for collisionless matter to form such small objects.
On the scale of galaxies, however, various relaxation mechanisms allows dark matter to form structure. This is the reason that in pure N-body simulations of the Universe, such as the Millennium Simulation, you will see galaxies. The sizes of these structures depend on the resolution, but are measured in millions of Solar masses.
The relaxation mechanisms include:Phase mixing
This is sort of like galaxy arms winding up, but in phase space rather than real space.Chaotic mixing
This happens when particles come so close that their trajectories diverge exponentially.Violent relaxation
The two mechanisms listed above assume a constant gravitational potential $\Phi$, but as the systems relaxes, $\Phi$ changes, giving rise to an additional relaxation process. For instance, more massive particles tend to transfer more energy to their lighter neighbors and so become more tightly bound, sinking towards the center of the gravitational potential. This effect is known as mass segregation and is particularly important in the evolution of globular star clusters.Landau damping
For a perturbation/wave with velocity $v_p$, if a particle comes with $v\gg v_p$, it will overtake the wave, first gaining energy as it falls into the potential, but later losing the same amount of energy as it climb up again. The same holds for particles with $v\ll v_p$ which are overtaken by the wave. However, particles with $v\sim v_p$ (i.e. that are near resonance with the wave) may experience a net gain or loss in energy. Consider a particle with $v$ slightly larger than $v_p$. Depending on its phase when interacting with the wave, it will be either accelerated and move away from resonance, or decelerated and move closer to resonance. The latter interact more effectively with the wave (i.e. be decelerated for a longer time), and on average there will thus be a net transfer of energy from particles with $v \gtrsim v_p$ to the wave. The opposite is true for particles with $v$ slightly smaller than $v_p$
You can read more about these mechanisms in Mo, Bosch, & White's Galaxy Formation and Evolution.