'Fast' and 'quick' are both adjectives with very similar meanings, but they are not true synonyms. This is because they are usually not interchangeable.
'Fast' is to do with high speed. We talk about a fast car or a fast train, for example - we would not say 'quick car' or 'quick train'.
'Quick' means that something doesn't last or take long, or that it happens promptly. For example, you would say 'Can I have a quick word?' if you want to speak to someone briefly, or 'I need a quick answer' if you need an answer your question promptly. If you're telling someone not to take long doing something, you'd say 'Be quick. Come back in five minutes.' You couldn't use 'fast' in those situations.
Also note that 'fast' is an adverb. The adverb from 'quick' is 'quickly'. 'Fast' and 'quickly' are often interchangeable.