Here's why:
* Parfois means "sometimes" and is an adverb.
* On is the third person plural pronoun, meaning "we" or "one" in a general sense.
* joue is the third person singular form of the verb "jouer" (to play).
Jouons ensemble would be correct if you were using the imperative form (command), meaning "Let's play together."
So, the sentence parfois on joue ensemble translates to "Sometimes we play together."