It's a slightly misleading figure because it includes all the stock grants given in 2017. From the proxy statement:
> we calculated as actual salary paid to our employees for 2017 [...], actual bonus or sales commission earned by our employees in 2017, and the value of equity awards granted to our employees in 2017
Specifically, if you joined in 2017 the value of your entire initial stock grant was used. This skews the median quite a bit. For example, if I joined Facebook in 2017 at $150,000 and received a $400,000 RSU stock grant vesting over four years my median annual income for the purposes of these SEC calculations was $550,000 (even though most of that is in stock vesting over the next four years).
You don't get taxed when they are granted. That would be pretty rough, because a lot of people get several years of RSUs granted when they join a company.
When the RSUs vest, they are taxed as income. If you hold on to the shares for a while before selling them, and they increase in value, you'll pay capital gains taxes when you sell them.
1. http://www.businessinsider.com/facebook-median-pay-240000-20...
edit: salary package (salary, bonuses, and stock grants), not salary alone