Why is Puerto Rico a separate country in the Olympics?

Puerto Rico is a territory of the US. So why is it represented as a country and not a part of the US?
0