What causes the solar day of a planet to be different from its sidereal day?

The sidereal day of a planet is the time it takes to rotate once on it's axis. The solar day is the time from sunrise to sunset.

To see why they are different, let's image a planet that rotates very slowly. Every time it goes around its star once, it also rotates once on its axis. Since it rotates once on its axis per year, there is one sidereal day per year. Now, in order for this to work, one side of the planet must be facing the star at all times. This means that there is no sunrise or sunset, so on this planet, there are zero solar days in a year.

Now let's image a planet that rotates twice a year (has two sidereal days a year). At the beginning of the year, a side of that planet is facing the star. Halfway through that year, the planet has rotates once, but is on the other side of the star, so that side of the planet is now facing away from the star. At the end of the year, the planet is back where it started. There has been one sunrise and one sunset, so only one solar day.

From this we can see that a planet (as long as it has at least one sidereal day per year) has one more sidereal day per year than solar day per year. There are 365.242 solar days in an Earth year, but there are 366.242 sidereal days in an Earth year.