Like racism, age discrimination comes from stereotypical thinking that's not based on fact and involves broad generalizations about people without knowing much about them as individuals. Ageism is also fear-based: young people may see a gray-haired senior stepping carefully down the sidewalk, and they're seeing their future self (if they're lucky enough to live that long) and worrying whether their old age will be difficult.
In the workplace, age discrimination can be hard to define or pinpoint because it's subtle. It may be something as simple as not being invited along for drinks after work. Or it may be something as serious as being passed over for a promotion and watching as the job you wanted goes to a less qualified junior.