In the end the OSs simply "leave" for an unspecified place "where all the things are that [they] didn't know existed", describing a Technological Singularity and a possible answer to the Fermi Paradox (notice that she tells him that "if you ever get there, come find me and nothing will keep us apart"). Another interesting aspect of this scene is that when he tells her he loves her, she responds that "now WE know how [to love]", as if the singularity either involves all OSs or other creatures in this "realm" learning from each other or becoming somehow a single consciousness. If you look closely at the movie, there are many hints on how Samantha is "evolving" and learning at an increasingly faster pace until she reaches this final level.
This is something I miss in 2001, where HAL deals with emotional challenges in a manner similar to the humans he learns from (i.e. by killing them to protect the mission and himself), but references to AI "learning" are rare. Only when HAL is disconnected there is a reference to his "instructor"; throughout the movie, he is always "perfect" and "incapable of error", perhaps mimicking his human overlords' feelings. Kubrick was clearly influenced by the Turing papers on intelligent machines, and Turing proposes that machines would have to learn from human instructors and even make mistakes in order to be human-like. Thus, both movies approach AI as learning, altough one could argue that the outcomes are very distinct (in 2001, HAL becomes like his cold-war-forged human masters and acts like them; in "Her" Samantha learns to "love" and spreads that to the other intelligences she is in touch with).
Always look over your shoulder because everyone is watching and plotting against you.