Retirement tax questions

I'm just trying to figure out which of the gains would be taxable to see if it makes sense vs the stock market for example. Distributions, capital returned during refinancing or capital gains during the sale/exit?

 

They just say: If there is UBTI, IRS Form 990-T must be filed and the taxes must be paid from the IRA. We recommend that you consult with your tax advisor to determine if there is any UBTI.