A time horizon is how long someone wants to invest a sum of money before they need/want to take it back out to use.
Person A has a fully funded emergency fund and $20,000 of excess cash they want to invest. They want to use $12,000 of it in a year for a car, but the rest can stay invested for at least 10 years. Their time horizon the $12,000 is 1 year, while the time horizon for the rest ($8,000) is 10+ years.
If someone has a time horizon of less than 3 years, it may not be a good idea to invest in stocks (or other risky assets), as they could drop in value and not bounce back by the time the person would need to sell.