Phase-change materials absorb and release heat during their transition between solid and liquid states. These materials can store and dissipate large amounts of heat, making them effective for managing temperature fluctuations and enhancing thermal stability in electronic systems.