What makes a glass a glass and a cup a cup?

What if it’s metal. Is it a cup then?