An Exchange Traded Fund (ETF) is an asset designed to track a particular segment of the market, or less common, a particular investing strategy (for example, dividend investing, momentum investing, contrarian investing, etc.).
There are ETFs composed of all stocks in particular segments of the market such as the biotechnology industry, the real estate industry, oil and gas, mining, etc.
There are ETFs that enable you to invest in the entire large, mid and small capitalization segments of the market; such as the SPDR S&P 500 ETF for the large cap, the iShares S&P U.S. Mid-Cap Index ETF for the mid cap, and the iShares S&P Small-Cap 600 UCITS ETF for the small cap. There are also bond ETFs that offer specific exposure to segments of the fixed income market.
When you purchase an equity ETF, you are buying a "package" that is made up of all the stocks that trade in that industry or segment of the market. Since no one picks these stocks, the "package" is cheap to assemble and can be offered cheaply to investors. The drawback of ETFs is that no one weeds out the companies that perform poorly and there are no personalized ETFs. On the other hand, there is considerable evidence from academic research that broadly diversified ETF portfolios like the S&P 500 outperform many active stock pickers after expenses. This is particularly true of hedge funds with their 2 and 20 percent fees.