How does igneous rock become sedimemtary?

is it by the cooling rate?