The tilt of a spinning object can vary;  earth is no exception.  The obliquity of the earth varies between about 22 and 24 degrees with a period of about 41,000 years.