The posting means exactly what it says - that for five years you were actively using language X. They don't have to be consecutive, If you used it for three years, then didn't use it for a year, then used it for two years, that's OK. It does not mean you learned language X at least five years ago - you must have been actively using it for five years.
Recruiters are well aware that years of experience does not correspond to skill or knowledge - some people can know everything about a language in a few years, some can use one for years without getting into complex scenarios. It also doesn't mean that you are expected to know any specific thing without having to look it up. But it's an approximation that is generally useful.
Remember this is just to get you through the resume filter. Your actual knowledge will be tested at interview (or something else).