The misleading part about almost any mention of "millions of degrees" is that people implicitly expect this happens under earthly conditions, when in fact these values are typically just a reference to the speed of atoms in a rarified environment. Like the sun's corona, it may be very hot, but not very dense. In other words, there is not a lot of energy per volume, just a lot of energy per particle.
For example, a common way to reach "millions of degrees" is to pump the air out of a container to an extreme degree, then introduce trace amounts of a gas, and then accelerate or otherwise heat those few particles.
If this happened under normal pressures, there would be no container material that could withstand these temperatures. But in a near-vacuum, the collisions between the accelerated particles and the walls can be kept low. In an experimental fusion setting like this, they also employ a magnetic field to keep the plasma away from the container.