'Friend' is 朋友 as in :
是某人的朋友 = to be friends with somebody
'Friend' is an intimate you regard with loyalty, affection and liking.
A 'classmate' is 同学 in Chinese.
A contemporary of the same class in a school or a college, who could be a friend as well
A 'classmate' many times is a 'friend' ,because of the intimacy that develops by sharing the same classroom for long times.
A 'friend' on the other hand is not necessarily a classmate, you can make friends in many other places and events.