The words heard, herd sound the same but have different meanings and spellings. Why do heard, herd sound the same even though they are completely different words?
The answer is simple: heard, herd are homophones of the English language.
Simple past tense and past participle of hear.
A group of cattle or other domestic animals of a single kind kept together for a specific purpose.
A number of wild animals of one species that remain together as a group: a herd of elephants.
A large number of people; a crowd: a herd of stranded passengers.
The multitude of common people regarded as a mass: "It is the luxurious and dissipated who set the fashions which the herd so diligently follow” ( Henry David Thoreau). See Synonyms at flock1.
Definitions from Wiktionary, Creative Commons Attribution/Share-Alike License, from The American Heritage® Dictionary of the English Language, 4th Edition and Wordnik.
Homophones (literally "same sound") are usually defined as words that share the same pronunciation, regardless of how they are spelled.
If they are spelled the same then they are also homographs (and homonyms); if they are spelled differently then they are also heterographs (literally "different writing").