If the starter motor is spinning over but not turning the motor, commonly this is caused by a failure of the starter clutch. The starter clutch is connected to the starter motor, it allows the starter to grab the flywheel, but once the motor catches and starts rotating the flywheel faster than the starter motor can, it slips so as to not "drag" the starter motor along with it. These can fail and slip permanently. They will need replacement. Its also possible that the starter shaft is stripped, or that something is disconnected or fell apart. Once you get home you can get into it, but in the mean time, you can bump start the bike to get it moving.