Louise Banks a Linguist has helped to try to learn a different Language when aliens which they call "heptapods" land on earth. She gets taken to a site where she meets Gary Donelly a physicist, they are both assigned to 9 "looking glasses". Cites where they come I contract with aliens & attempt to understand their language.
Louise & Gary both attempt to learn their language as they talk to the "Heptapods" to which they give names. Raspberry & Flapper, realized that their written and spoken words arent related at all. Progress wasn't made until Garry explain that the Fermat principle and Louise understand that it's similar to the light in the principle.
Now that Louise knows and understands the Fermat Principle she is able to experience complete immersion with Hetapod B, which then causes her to have a glimpse of the future. She sees her future daughter and her death. One day the aliens leave but Louise's life is changed forever, she doesn't make sure to change anything about her future & proceeds to make a baby with Gary