What caused the earth's axis to tilt? Did this cause a change in the amount of days it takes for the earth to revolve around the sun?
The original tilt was determined by a collision with a large proto-planet some 4.4 billion years ago as the Earth was forming.
The current tilt of the Earth was determined in the formation of the solar system and at a time when there was heavy bombardment of stray material onto all of the early forming planets. The Earth was pretty much formed, when a Mars-sized proto-planet struck the young Earth. In the aftermath, the moon was formed and the present tilt of the Earth was established.
However, this tilt is not fixed and does vary over periods of about 41,000 years in which it moves between about 3 degrees. This is part of the Malankovitch cycles that have produced glacial and interglacial periods in the last 2 million years. The Earth also wobbles a bit on its axis like a top on a 24,000 year cycle - called precession.
Its not know exactly why these variations occur to the Earth's tilt, but one leading hypothesis is that the gravitational attraction of the large planets. like Jupiter and Saturn, might play a role.
It doesn't change the amount of days it takes to revolve around the sun, but does impact the amount of solar energy Earth receives and is the reason for the glacial/interglacial cycles. A third movement, called eccentricity, does cause the Earth to periodically move further from the sun (100,000 to 400,000 year cycles) and this probably changes the length of the year. The reason for this variation is also not clear, but gravitational changes as our solar system makes a revolution around our Milky Way galaxy may be a contributing factor.