Investors & landlords

The initial inheritance was not taxable at the time.  But after you have the cash, it’s the same as any other money you happen to own for any other reason.  Anything you do with it is handled according to the normal rules.  So yes, if you invested it and have a gain, you owe capital gains tax whoever those gains are realized.