A few of my clients talk the entire session. I listen and let them talk as much as they want. It was a little hard at first (years ago) to keep up with their conversation and keep my mind on their workout. But now it is no problem. I actually find it a nice relief from clients that expect me to talk and keep them entertained/distracted/in the moment/etc. And for many of them, it seems to relieve their stress from their lives, work, families, etc.
But if that isn’t your client fit, I would consider referring them to another trainer. If you don’t like the talkative client, it will wear on you. Or you could try to enjoy it from another viewpoint.
This is part of being a Personal Trainer. These people see us as someone who they feel free to talk to and “unload” what ever bothers them. We are also part psychologists and if you really want to be successful in this business than listening is a big part of the it. So depending on the client you’ll have to take it case by case. There is always a way to work both in (training and carrying a conversation).