Start by taking some time to reflect. If you get demoted, it's a good time to step back and look at your big picture goals. Take stock of what you're getting from the company to make sure you're in the right place. Then, try to make a plan for how you can do better and be successful in the future.