I think a lot depends on the breed, and the conditions they are kept in.
You'll get a couple of years of good production, in general. Some people swap out their laying hens yearly, or stagger it so that they are replacing layers after 2 years, replacing half the flock each year. Others keep hens into "retirement."
Commercial battery hens are usually sent to the soup factory after about 18 months.
Most backyard chickens will decline in production over time after their productive years, but will continue to lay for years after their best years are behind them. Some breeds are reported to lay for longer periods than others. There are a few breeds that are not long-lived, though.
I have read about people with 10 year old hens who still laid an egg every couple of weeks or so. Ten years is old for a chicken. I've not had mine that long, so that's second-hand information.
Hope that helps with your question!