how did scientist find out the different layers of the interior of the earth

(btw sorry I could not find science subject)​