By far, the most important thing is to do great research. Then, there is making people know you do great research. Here's what I think (the order matters):
Know yourself. What do you like? What are you good at? What's important for you?
Solving hard well-defined problems, or working on an open-ended project? Doing highly theoretic work, or solving problems with concrete real-life applications? Working on small-scale projects, or doing research marathons?
How do you learn best? How do you work best?
There are lots of ways to do great work, and the world benefits from them all. Find your own style, and adjust things to make it work.
Also - ask yourself these questions periodically, answer honestly, and plan accordingly:
Where do you stand? Where do you want to go? How can you improve, e.g., your knowledge, your skills, your approach?
Work with good people on worthy projects.
Work with people that have done successful research in the past, and whom you appreciate, people who are smart, skillful, experienced, motivated, and, very importantly, nice and trustworthy.
Work with them on a project in their area of expertise that is exciting both to them and to you. That's the best way to learn.
Be active.
After you gained some experience in research and in presentation of your work,
talk to more researchers, go to conferences, invite good people to visit and give talks, take internships, visit good places. Write a good survey on your area of expertise. Write a blog or an essay. Teach or co-teach a course or a mini-course. It all depends on what you're good at and what you like doing.