It is not possible to leave a one-on-one conversation. However, if the person you are having a conversation with is not a co-worker, you can remove him / her from you contact list.
You can leave a group conversation. To do this, click on ‘More’ in the web version and then choose ‘Leave conversation’. On your mobile device, go to ‘Options’ and click ‘Leave conversation’.