Same word, different job. Category depends on use, not spelling. In sentence 3, hard is an adverb because it tells how the team practiced. In “a hard test” it would be an adjective describing a noun.
Grammar Cheat Sheet
Every word below is tinted by the job it does in its sentence. Hover or tap a word to see why it belongs to its category, or hover a legend key to spotlight one part of speech.