Below is a picture of a modern-day soxhlet extractor. The solvent goes in the bottom round bottom flask and is heated. As it boils, the vapors rise to the top of the apparatus and condense in the water-cooled condenser on the top. These condensed vapors drip down over the sponge in the middle, dissolving compounds from the sponge. The drippings eventually go down to the bottom round bottom flask.
Thus, compounds from the sponge concentrate in the round bottom flask. The solvent is constantly boiling and condensing in a recycling process. Soxhlets are still used today in the isolation of natural products.