For the most comfort and best sound quality, your earbuds or earphones need a good seal with your ears. The Headphone List shares the best angle to try to get that fit. Because the ear canal is naturally angled slightly towards the front and top of the head, the earphone fit guide explains, inserting your headphones in that direction can help with the fit, not to mention comfort. If adjusting the angle doesn't do anything for you, try the site's other suggestions, such as using a different ear tip or experimenting with the insertion depth.
The guide goes into a lot of detail about different types of earphones and types of ear tips, which can also help you decide which headphones to buy.