Edited in the light of comments and follow-on questions
Your mutual fund manager buys and sells securities in pursuit of
the investment strategies
of the fund as well as to invest new money coming in and to pay out investors wanting to take their money elsewhere.
This results in capital gains and losses for the fund.
The net capital gain is taxable income (at corporate rates)
to the fund unless the fund distributes the gains to the shareholders
in which case the investors have to pay the taxes on the gains
that they receive. For what happens if the fund experiences a
net capital loss,
see this answer to a related question.
You have to report the capital gains distributions from a mutual
fund regardless of whether you chose to re-invest in the fund or
received the distribution in cash, or had directed your broker
(or the fund company) to reinvest the distribution into another
fund etc. You do not report or pay taxes on any changes in
the value of your mutual fund investment as share prices of the
securities of the fund fluctuate; only when you sell
any shares do you have a capital gain or capital loss on that
portion of your investment.
With regard to your question about "taking from your shares", the value of
your mutual fund shares is determined by the net value of the underlying
securities held by the mutual fund plus any cash held by the mutual fund.
When the mutual fund makes a capital gain (or dividend) distribution to
its shareholders, the mutual fund assets decline in value by the amount
of the distribution because that money is out the door. Consequently
the share value falls proportionally. For those who choose to re-invest
in the fund, they get to buy the fund at the reduced value. Put another
way, suppose you bought 100 shares at $8 per share on January 1, 2010.
Your basis (the amount invested) is thus $800.
In 2010, the net capital gains of the fund were 0 and no distribution
was made. In late 2011, the mutual fund shares were valued at $10
and so you have a unrealized gain of $200, not reportable, not
taxable etc. But suppose that during 2011, the fund sold some securities
for a capital gain, and so in late 2011, it made a distribution of
$1 per share and "sent you" $100. After this distribution,
each of your shares would have value only $9, and your net wealth
would be $900 in shares plus $100 in cash. If you have chosen to
reinvest the $100 in new shares, you would be buying 100/9 shares
at $9 dollars each so that you now own (100+100/9) shares valued
at $9 each, making your net wealth $(100 + 100/9)x9 = $1000 just
as before. No change in value, but you have to report the $100
received on your tax return and pay taxes on the
$100 received, even though you reinvested the whole amount.
But now your basis in the fund is $900; the amount
$800 you originally invested plus the $100 you plowed back
into the fund. If at a later time, you decide to get out of
the mutual fund, and the share price is still $9 that day,
you will get $1000 for your 100+100/9 = 111.1111111 shares.
Only $100 of that amount is taxable since your basis is
$900. The point of JoeTaxpayer's comment below is that far
too many people forget to add the reinvested amounts into
the basis and say "I put in $800, got $1000 back, and so
I owe taxes on $200 profit" quite forgetting that they
actually invested $900, or equivalently, that they already
paid taxes on 100 of the 200 dollars, and so taxes are owed
only on the remaining $100.
(note from JoeTaxpayer added) - If reinvested, you must add the $100 to your basis, the same as if 'new' money came in. This point is often missed and tax paid twice in error.
There have been several years in the recent past where mutual
funds declined in value over the course of a year (unrealized
capital loss for the share holder) but still paid capital gains
distributions which had to be reported and on which tax had to