In general, the chief executive officer (CEO) is considered the highest ranking officer in a company and the president is second in charge. However, in corporate governance and structure, many permutations can take place, so the roles of both CEO and president may be different, depending on the company.
The board of directors is elected by the shareholders of a company and is usually composed of both inside directors, who are senior officers of the company, and outside directors, who are individuals not employed by the company. The board establishes corporate management policies and decides on big-picture corporate issues. Because the board is in charge of executive functions, and the CEO is responsible for integrating company policy into day-to-day operations, the CEO often fills the role of chairman of the board.
Another factor that determines the positions of company officers is corporate structure. For example, in a corporation with many different businesses (a conglomerate), there may be one CEO who oversees a number of presidents, each running a different business of the conglomerate and reporting to the same CEO. In a company with subsidiaries, it would be unusual to have one person carry out the roles of both CEO and president.
A company without subsidiaries may have one person execute the roles of CEO and president, and perhaps even chairman. As such, greater communication and contact can be achieved between the board of directors that sets policies, and the president who oversees the day-to-day operations. For example, Shantanu Narayen, Jeff Bezos, and David S. Taylor carry the title of both president and CEO at Adobe Systems (ADBE), Amazon.com, Inc. (AMZN) and Procter & Gamble Co. (PG), respectively.
Presidents often hold the position of chief operating officer (COO). The COO, responsible for day-to-day operations, has vice presidents for different parts of the company reporting to him or her. Generally, the board of directors sets the policy, the president executes the policy and reports back to the board. Finally, the board reports back to the shareholders, the ultimate owners.
These are examples of general scenarios. The CEO is not always the chairman of the board, and the president is not always the COO. Whatever the arrangement, the ultimate goal in corporate governance is to effectively manage the relationship between owners and decision-makers and increase shareholder value. (See also: "The Basics of Corporate Structure.")