A day (a day and a night together) is the time during which Earth makes one full turn about its axis.
When one side of Earth is turned towards the Sun, the opposite side is turned away from it. There is a day on the side that sees the Sun and a night on the opposite one.
A year is the time during which Earth (or other planet) makes one full turn around the Sun.
The causes of the change of seasons are rotation of Earth around the Sun AND the tilt of Earth's axis. This tilt is not so great (about 23°), but is sufficient to make a difference. When the Northern hemisphere is most inclined to the Sun, it is summer on it, and winter on the Southern one (and vice versa). The stretch of Earth's orbit around the Sun is not the cause of seasons' change.
There is no cause that year must contain a whole number of days. And actually Earth's year contains about 365 and 1/4 days.