Your coworkers are also, in a sense, your competition. You may be working toward the same goals in the office, but you're also competing for promotions, raises, and other office perks.
That's a challenging position to be in, especially when you like your coworkers and genuinely want them to succeed. Assuming that's the position you're in, it's important to remember that team goals need to come before personal ones, and being a good teammate will serve you better in the long run than being ruthless.
You want to get ahead, but you want to earn it on your merit, not at the expense of someone else. Work hard, but never let your ambition make you someone people don't want to work with (and that likely won't help you get ahead).
1. Share credit
True leaders acknowledge that they can't get everything done themselves. Make sure that a team success gets celebrated that way, even if you took a lead role. Make sure you call out the contributions of other people and make it publicly known that they were a big part of why things worked.
2. Be willing
In a room full of people who are all talented, sometimes being willing to do whatever is needed can make you stand out. Volunteer to do the unpleasant tasks and never say no to an assignment unless you honestly can't do it.
Be willing to learn new skills or to take on tasks that make you uncomfortable. That should be noticed by the boss, and actually make you a better worker.
3. Have ideas
Leaders find new ways to do things, or develop changes that help their business move forward. Don't be shy when offering to try things that might lead to success, but accept that not every idea will be accepted. Be a thought leader who tries to bring about positive change.
4. Help others grow
If you can teach something you know to a coworker it makes the whole team stronger. Be generous with sharing your skills and helping other people learn new things, or become better at what they do. There's no benefit for the company in you being the only person who knows how to do something. Spread the wealth -- it not only takes pressure off of you, but it may also free you up to do other things.
5. Put in the time
In a field of equals, it's sometimes the person who works the hardest who gets ahead. You don't always have to be the first to get in and the last to leave, but you should often be one or the other.
It's important to not just appear to be working hard, but to actually be working hard. This isn't all about time spent in the office, it's about actually getting more work done.
Win and lose graciously
It's possible to do everything right and still not get ahead. Maybe someone else deserves a promotion or opportunity more, or maybe it was really close and they have been around a little longer.
No matter what happens -- whether you win or lose -- be gracious. Accept that it's not always your time. Be patient and put the work in, and generally things will work out for you.