There is no major difference between the two words. The distinction is in context. For instance, we use 'compile' often when we are talking about collecting things with the intention of putting them together in order to make something new available.
Consider an anthology of short stories. The editor compiles different short stories into a new book, an anthology.
To see 'collect' in context, the most common subject would be hobbies. For instance, I collect coffee mugs. I have no intention of putting these mugs together and selling them as one package. I collect them because I like them and would like to keep them.