This has always been the case throughout history: new technology makes some jobs irrelevant, and humans adapt by doing new jobs. It's unfortunate for people who cannot or will not adapt, but historically people have been resilient to such changes.
It's a legitimate issue when there aren't enough jobs to employ a significant portion of the population, and perhaps we're starting to reach that point now. We're seeing a decoupling in our economy: job growth is slowing while corporate growth and profits continue to rise. On one hand, this indicates that we are heading towards post-scarcity conditions. On the other hand, the current arrangement is that an increasing amount of wealth is being distributed to a decreasing number of people, leading to greater wealth inequality.
What can be done? We might increase wage/salary while cutting the number of hours worked per week, allowing more people to work while still providing a livable income. A basic income is another option, but that seems extreme; things would have to get much worse (or better, depending on your long-term view of automation) before that's taken seriously on a large scale.