Those who control the "means of automation" (robot factories, power stations, etc) --let's say 0.01%--, will rule over the rest, in gated communities and closed enclaves.
A small percentage of the population will live alongside them, in B-rated residences, to provide them services that, either still need humans or are better done by humans (e.g. sex), or its considered "classier" to have humans do for you (e.g. cooking). Let's say that's a 10%.
The rest 90% will be left to rot in urban and suburban slums, develop their own black economy, and shot on sight when they dare enter the rich areas.
https://www.amazon.com/Planet-Slums-Mike-Davis/dp/1784786616
https://www.amazon.com/City-Quartz-Excavating-Future-Angeles...
Right now, that definition is commercial GDP value, but even that metric's inventor warned us that it's a bullshit metric [1].
Old people living by themselves sometimes spam call doctors, not for their heart bypass commercial value, but to feel materially better after talking to another human, which has no commercial value.
When I was trying to figure out what to do after high school, I was full of energy and curiosity for this world and wanted to do everything from being a historian, to a musician, to astrophysics, which, let's face it, has no commercial value. Now I'm coding. Luckily I like coding, but not everyone's lucky to have their interests align with commercial value.
Maybe it's not so bad for humans to be humans again.
[1] https://en.wikipedia.org/wiki/Gross_domestic_product#History
What will happen to a society where every single person has their basic needs met by some form of automation, and nobody needs to work?
I would say most first world countries are already in this scenario if so much money wasn't spent on non essentials. Industrial scale farming, mass produced pharmaceuticals, rapid house construction etc. mean that if a society wanted, you could have 10% of the population providing for the 90% (an inversion of what was the case for most of human history).
There is no precedent or example from history to show us what this will do to society. How will humans cope with not actually needing to do anything? I personally envisage a Matrix like scenario where this societal change will also usher in advances in VR and related tech. People may spend most of their time engrossed in entertainment, until eventually, they see no need to participate in the real world at all.