When you do something spontaneously, you do it on a whim, without preparing for it or giving it much thought. If your math teacher spontaneously breaks into a tap dance, it will surprise the whole class.
Spontaneously belting out a song on the subway is very different from practicing over many weeks for a choral concert solo. Things that happen spontaneously aren't planned: improvisation in music or theater, for example, happens spontaneously. Spontaneously comes from the adjective spontaneous, with its Late Latin root spontaneus, "willing," or "of one's free will."