How do I stay at the front of the pack?

There are several things to keep in mind on the group ride or in a race