"Extract" comes from the Latin word "extrahere", which means "to draw out". This is formed from the prefix "ex-" meaning "out" and the verb "trahere" meaning "to draw".
So, "extract" essentially means "to draw out" something, and its root "tract" relates to the act of drawing or pulling.