Companies typically know who their competitors are in the open marketplace. But these aren't always the same companies you need to compete with for the best placement of your website!
In the world of search engine optimization, your competitors are any websites that can be found by the same search queries as yours. For example, a hairdresser in Boston also offers consultations on beauty products. Therefore, their website will be found by the search query ""beauty products Boston"". The same query will return results for a pharmacy that sells beauty products in Boston. Both businesses are competing for the same search term.