This happens in several steps under immense gravity in a collapsing star. First, you must realize that the matter in a star isn't like matter on earth. Solids occur when atoms lock onto each other in what is called a crystal lattice. Liquids occur when heat makes the atoms so agitated they break out of the lattice and slide around each other. Gas occurs when more heat makes them so jumpy they break loose and ricochet wildly in open space.
Intense gravity compresses the atoms so much that the pattern of orbits around a nucleus is crushed.
Without orbits to shield them, the nuclei collide with each other and fuse. Any mass of material, if it's big enough for its own gravity to squeeze it into plasma, becomes a star. The planet Jupiter is almost large enough. In fact, astrophysicists think a tiny amount of fusion is occurring in Jupiter's heart. It's 10,000 times denser than steel, and weighs 10 tons per thimbleful.