The first to file policy is a patent law doctrine which states the patent for an invention rightfully belongs to the entity which filed a patent application first, as opposed to first to invent. Based on this policy, even if Alice invented the same things as Bob before than he did, the patent would go to whoever's patent application was received by the patent office first.
A famous example of this is Alexander Graham Bell's patent U.S. patent for the telephone, which was received only hours ahead of Elisha Gray's. As a result Bell, not Gray, got the patent.