In the early phases of the creation of the universe, a supernova sent a shock wave through a solar system-sized cloud of cold hydrogen, creating a solar nebula. The momentums of each molecule of hydrogen combined, sending the nebula spinning and creating the planetary disk. Gravity caused the planets to cluster out of this seeming chaos. As the molecules spun, they acquired more and more material. Early in the solar system's formation, collisions of these spinning dust clouds may have shaped the rotation and tilt of the planets.
An object in motion will remain in motion until something acts on it. Nothing keeps the earth spinning on its axis, but nothing stops it, either. Because space is a vacuum, there are no forces acting to stop the spinning, and the earth continues to spin.
The earth is slowing down in its spin due to the tidal friction the oceans have on the planet due to its gravitational pull with the moon. Though this is significant enough to extend the day by a few moments each century, the sun would burn out before this slowed the earth significantly enough to harm its inhabitants.
While earthquakes can theoretically wiggle the earth a bit, there is no conclusive evidence to anything short of outside force being able to move the earth out of rotation. This is discussed by Steven Dutch of the University of Wisconsin in his essay "Changing the Earth's Axis or Orbit." If the earth were to be hit by a large meteor, the side on which the earth was hit would be altered, while the other side would remain largely unaffected. This would cause a disruption great enough to move the earth on its axis. Since this has not happened in recorded time, the earth continues to spin at what is scientifically considered the original tilt.