I think both are very similar and can be used interchangeably, with “parfois” being a bit more common in everyday use, but if you really wanted to distinguish between them, I think you could see “parfois” as “sometimes” (a vague number) and “quelquefois” as “some times” (a little bit more concrete or distinct number that you could possibly count)