Hola......
Compañero.
When you use " compañero", in this word is including a friend relationship. You are friend of this person.
Socio.
When you use " Socio " in this word is not included a friend relationship, it isnot necessary to be friend of your Socio.
Sometimes the " SOCIOS " are friends. And sometimes the " socios " are not friends.
So you can say " MI compañero de clase " he is my friend and we have many things in common.
If you say " MI socio in class " you work with him but he is not your friend, and you can have a good relationship or bad relationship with him.
At last. You can have " MI vecino es mi compañero y mi socio "
O tengo un socio que no es mi compañero.
Thanks bye