What are the 3 ways that a rock can melt into magma?