We probably won't really know for certain until we have time to gather more data from survivors. However, infection with existing coronaviruses (including SARS-CoV, genetically very similar to the COVID-19 virus SARS-CoV-2; ref. https://www.nature.com/articles/s41564-020-0695-z) suggests that those who are infected and survive may develop temporary immunity (ref. https://www.statnews.com/2020/02/04/two-scenarios-if-new-coronavirus-isnt-contained/):
The toll of a seasonal-flu-like coronavirus also depends on immunity — which is also scientifically uncertain. Exposure to the four endemic coronaviruses produces immunity that lasts longer than that to influenza, Webby said, but not permanent immunity. Like respiratory syncytial virus, which can re-infect adults who had it in childhood, coronavirus immunity wanes.
“Everyone, by the time they reach adulthood, should have some immunity to some coronavirus,” said Tim Sheahan, a coronavirus researcher at University of North Carolina’s Gillings School of Global Public Health. But because it doesn’t last, older people can get reinfected. The elderly also have a higher death rate from coronaviruses such as SARS and MERS, a pattern 2019-nCoV is following.
“There is some evidence that people can be reinfected with the four coronaviruses and that there is no long-lasting immunity,” Dr. Susan Kline, an infectious disease specialist at of the University of Minnesota. “Like rhinoviruses [which cause the common cold], you could be infected multiple times over your life. You can mount an antibody response, but it wanes, so on subsequent exposure you don’t have protection.” Subsequent infections often produce milder illness, however.
It might also be possible that someone was infected with two different strains of SARS-CoV-2 and did not develop immunity from the first infection. But it could have also been a continuation of the first infection, or testing error. Without virus sequence data, it was not possible to determine what happened for certain (ref. https://www.wired.com/story/did-a-woman-get-coronavirus-twice-scientists-are-skeptical/):
What could be worse than getting the pneumonia-like illness now known as Covid-19? Getting it twice.
That’s what Japanese government officials say may have happened to a female tour bus guide in Osaka. The woman was first diagnosed with Covid-19 in late January, according to a statement released by Osaka’s prefectural government Wednesday. She was discharged shortly after, once her symptoms had improved. A subsequent test came back negative for the virus. Three weeks later she returned with a sore throat and chest pain and tested again. For a second time, she tested positive for Covid-19.
News reports detailing the case raised the possibility that people may not be developing immunity to the new coronavirus, even after they’ve recovered. But several infectious disease specialists say there’s not enough data to support that conclusion. Another possibility is that the virus subsided and flared up again. (Some viruses tend to do that.) Or the test was simply wrong.
If someone was infected twice, comparing the genomic sequences of the virus over time would have helped determine that with more certainty.