Any time you sell an asset for a profit, you are responsible for paying tax on it. When you own your own shares, this event is triggered when you sell. With funds, you also are responsible for declaring capital gains along the way, but ETFs are set up to avoid this and usually do not require capital gains to be declared while the shares are held.