When one firm or country competes with another, it tries to get people to buy its own goods in preference to those of the other firm or country. You can also say that two firms or countries compete .
If you compete with someone for something, you try to get it for yourself and stop the other person getting it. You can also say that two people compete for something.