It's hard to say, because these words are almost never used nowadays, and even I, as a native speaker, probably can't explain them exactly. You can say that they are almost synonyms.
"tovarishch" is something like people you have to communicate with, for example, at work. You don't talk to them about personal topics, you don't know what he likes, you don't even know a word about him, whether he is married or not, etc. You may know his first and last name, maybe his age, and the most you say is "hello-hello" when you meet out of politeness, because you see each other every day. Roughly speaking, a stranger, but with whom you cross paths and have common goals, fight or work with the same goal, but have nothing personal.
"priyatel" is something close to a buddy, for example, a neighbor with whom you met a couple of times, exchanged a few words, learned minimal information about each other, like where you study or work, what you are interested in, and you can stand and talk about something for a while when you meet, for example in a store, or you have some mutual acquaintances and you sometimes meet at a party and there you can talk about some common topics, but in ordinary life you do not meet and do not chat with him.
I do not exclude that there were people who called their friends "priyatel" So if you can understand from the context that you communicate on personal and close topics as with a friend, or you are trusted as a friend, then most likely this person considers you his friend, using the word "priyatel" for this.
But in general these are almost dead concepts, only older people can communicate like this, because this is how they communicated during the USSR, and people born and raised at that time still use these words out of habit. Now we usually say buddy - familiar "znakomyy" For everyone with whom we communicate or communicated but who is not a friend.