Although each has divergent meanings in different senses, but they may be synonyms.
He ran fast / quickly / swiftly. (adverbs)
That was fast / quick. (adjectives)
Sometimes, it's just the smoothness of the sentence or phrase that determines which you use.
We [always?] use quickly in pre-verb constructions (he quickly walked from the building), and after the verb (he walked quickly from the building) if the sentence rambles on.
Shorter sentences tend to use fast (he ran fast) and imperatives use quick (rather than quickly) in spoken language, although in writing you will see the more proper quickly: Come quick! vs Come quickly!
A dictionary will give you the many other definitions of these two words that have little in common. As I've said, the shorter the word, the greater number of meanings it can have!