Markets do not like uncertainty. The unexpected win for Donald Trump was not priced into markets as it appeared even in the last few days that the election would go to Hillary Clinton. A win for Clinton would have likely meant little variation from current policies in Washington; how a Trump presidency will affect the U.S. and global economies is uncertain at this point.
It is important during times of market uncertainty to not react emotionally in the moment, but to focus on your long-term financial goals. It is human nature to fear uncertainty, and to want to take decisive action in order to regain a sense of the known. This is often the worst thing an investor can do, as reacting negatively to a temporary event can cause permanent damage to your long-term plans.