1. Navigate to the DM you would like to leave
2. Select DM details by either right clicking/long pressing on the DM in your DM list, clicking on the name of the DM in the top-left corner once you're already inside of that DM, or clicking on the profile pictures of those in the DM in the top-right corner
3. Select "Leave"