Antibodies to SARS-CoV-2 are produced in those who have been infected. Early studies are suggesting that these antibodies are protective, which means that if you had COVID-19 then you are protected from getting COVID-19 again. However, it is unknown a) how ‘protective’ these antibodies are, and b) how long they remain protective for. Ongoing research will provide more insight into immunity. As of June, 2020 the available data suggest that re-infection is extremely uncommon.
Source: Shen C, Wang Z, Zhao F, Yang Y, Li J, Yuan J, Wang F, Li D, Yang M, Xing L, Wei J. Treatment of 5 Critically Ill Patients With COVID-19 With Convalescent Plasma. JAMA. 2020 Mar 27.