Difference between a managing director and a ceo?

There roles seem to be very similar, I’m starting a business, I would be running the business. Would I be the CEO or managing director, what more important? Which role is higher up? And which one is necessary a ceo or director or both?

What role should I register myself as. CEO or director? From what I’ve seen online CEOs are higher up yet, when looking at model articles of association documents they only seem to focus on the directors roles not the CEO, and it implies that the managing director, has the same responsibilities I typically thought was for the CEO.