Most Helpful Guy
Unless I'm actually in a rush to go somewhere, I'm the type to always steer to a conversation to something I know we'd both like before I leave the conversation. It's easy to change the subject. Just make a rabbit trail that leads into the thing you wanna talk about. Even if you have to say, "Hey, I know this is random but ______."
If they are a reasonable person they will acknowledge that you wanna talk about something else and won't hold it against you.
If you want to end it without starting another convo and not come across as rude then just say something along the lines of, "Hey, I'd love to talk to you more but I gotta go do ______."
If they're a person you can be real to then just tell them how it is. Tell them that you don't like talking about the current topic and that you should switch to something else. Better them know for future references. Maybe they won't bring it up as often after that.
Most Helpful Girl
Start talking about something else or if you’re not in the mode to talk then make a reason to excuse yourself