I don't know why you don't have a good dictionary on hand. It will help you clear up the confusion in the best possible way. Okay, I'll try and sum it up for you.
1. Compete (verb), competition. (noun). You can compete in three possible ways.
A - In business, if you compete against/with another company, you want to get people to buy your goods or services rather than those available from another company: "We are competing with companies that are twice our size."
B - In a similar way, if you compete against/with an ordinary person, you try to gain something and stop someone else from having it or having as much of it: "I had to compete against 20 other people for the job."
C - If you take part in a competition or sports event: "How many runners will be competing in the marathon?" You can use this word in both positive and negative senses.
2. Rival (verb, noun). A rival is your competitor, someone or some company you compete with. If you rival someone or something, you're trying to be as good or important as someone or something else: "This notebook computer rivals the power of some desk-top models." You can use this word in both positive and negative senses, but maybe a bit more in a negative sense.
3. The rat race is the unpleasant situation in business or in life in which people are always struggling to compete against each other for success: "A vacation is a chance to escape the corporate rat race for two weeks." It always implies a negative connotation.
4. Emulate (verb) emulation (noun). You emulate when you behave in the same way as someone else because you admire them. A synonym could be 'imitate': "He grew up emulating his sports heroes." It's positive mostly.
5. 'Keep up' is a phrasal verb. If you keep up with someone, you're trying to do as much or as well as other people: "Ben had trouble keeping up with the rest of the class."
Hope this helps! All the best!