You followed the instructions on the composer's website and probably installed the composer globally, if so, just use:
1. cd usr/local/bin
2. rm -r composer
If you placed the composer in another place, find him first
1. which composer
this will return the current path as folder1/folder2/composerthen the same steps:
1. cd folder1/folder2
2. rm -r composer
. :
1. cd /
2. cd Users/<hereYourUserName>
3. rm -r .composer