The words cues, queues sound the same but have different meanings and spellings. Why do cues, queues sound the same even though they are completely different words?
The answer is simple: cues, queues are homophones of the English language.
To braid or twist (hair) into a queue.
Games A long tapered rod with a leather tip used to strike the cue ball in billiards and pool.
Games A long stick with a concave attachment at one end for shoving disks in shuffleboard.
A queue of hair.
A line of waiting people or vehicles.
A long braid of hair worn hanging down the back of the neck; a pigtail.
Computer Science A sequence of stored data or programs awaiting processing.
Computer Science A data structure from which the first item that can be retrieved is the one stored earliest.
Definitions 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").