A CEO is in charge of all the hiring, resource allocation, and direction of a company. They are the "manager-in-chief"; they hire the other managers, define goals and areas of responsibility, and give budgets. The CEO is responsible to the board of directors and keeps them updated. If the company is public, the CEO and the CFO must sign all the financial reports.
The CTO will typically be a subordinate, and report to the CEO, or to another officer. The CTO has a narrower set of responsibilities, usually focused around product development and roadmap. A CTO might not even have any people working for them directly! But they are responsible for, as the name says, the "technology" of the company.
The CTO could well be the public face of a company! However, the CEO is ultimately in charge... at least, until removed by the board. Not every company has a CTO; but every company has a CEO, or somebody in an equivalent position but with a different title.
My old CEO had a list on his whiteboard of his priorities and jobs, you can find it in my answer here: https://www.quora.com/What-does-a-CEO-of-a-start-up-do-What-does-a-typical-day-look-like-What-are-their-responsibilities-What-do-they-do-to-grow-their-company-every-day/answer/Mark-Gritter. Our CTO did not have a similar list I can refer you to.
It's always confusing when it comes to chief executive officers. I also searched this question long ago on Internet to find out about responsibilities and key difference between each officers.
CEO - Chief Executive Officer
CEO focuses on overall mission and vision of the company. He is the Highest Ranking Officer in the company. Board of Directors appoints the CEO and CEO only report to Board of Directors. CEO have final decision authority on any decision of the company - Like Technology, HR, Operations, Financial etc.
CTO - Chief Technology Officer
Like name suggest it's Technology Officer of the company. Like CEO's main focus is overall mission and vision of the company, CTO's main focus is mission and vision of Technology related things. Like Software management, CRMs, etc. CTO is the head of technology and he reports to the Chief Executive Officer (CEO).
Hope this will helpful my friend.