What happens to preprints after the information contained in them gets published in a peer-reviewed journal?
In general, preprints continue to remain available even after publication. In fact, on most preprint servers, such as arXiv, it is impossible to completely remove a preprint once submitted, and any updates are stored as new versions. The preprint itself is a form of publication, where you can disseminate results, get feedback, and get a time stamp for your work without waiting for a lengthy peer review process.
Preprints may be cited and used to derive other works before they are published, so it is important to preserve past versions for the references to be coherent, particularly since a paper may be updated several times before publication in a peer-reviewed venue. The preprint version may be more likely to receive corrections and updates after publication, since that is easier than updating the journal version. It may also contain extra supplementary material missing from the published version due to length constraints, and so it is not necessary that the two versions are identical.
Regarding citations, services such as Google Scholar are usually able to interpret several versions of the same paper as a single entry. However, issues with this do exist, and have so far not been satisfactorily resolved.