Investors & landlords

So I get taxed now and again later when I sell it?