Extreme States of Matter: on Earth and in the Cosmos