There are two different questions in your question.
1. Why did Will trade his medal for wine?
The answer to this is clearly given by Will.
Will: I didn't lose mine.
Blake: What happens to it then?
Will: Why do you care?
Blake: Why do you not?
Will: I swapped it with a French Captain.
Blake: Swapped it?!
Blake: For what?
Will: Bottle of wine.
Blake: Why would you do that for?
Will: I was thirsty.
2. Did I understand this correctly? Am I supposed to understand what he is talking about?
After this, the conversation escalates where Blake suggests to Will that he should have kept the medals or given them to his family back home. To which Will responds by calling them "a bit of bloody tin." Obviously he does not regard those pieces of metal more than human life. Probably because he has seen many battles and is less enthusiastic about a suicide mission of delivering a message by going through German lines.
Will then goes on saying,
I hated going home. I hated it. When I knew I couldn't stay, when I knew I had to leave and they might never see 'em...
I hated it when I was told that I was sent back home. That I wouldn't see them again...
Here he is reluctant to go home, as he knew he would again be called for duty. He does not want to go through the pain of separation again and again. Or maybe he does not want his family to possess those medals and ribbons in case he gets killed in the war, as that would be a constant reminder.
After this conversation, Blake also tries to understand Will's perspective.