A word that is pronounced like another word but has a different spelling and meaning is called a homophone. For example 'sail' and 'sal' sound the same but have a different spelling and a different meaning. Here 'sail' means a boat or ship travelling on water and 'sale' means a store selling its goods at a lower price than usual.
Let us see another sentence: I knew that Lisa would wear her new dress.
Here knew refers to the speaker who had knowledge or information about something. New refers to a thing that has recently been made and is not old. The words knew and new sound the same but their spelling and meaning is different. They are said to be homophones.