In the case of rejection, reviewers remain anonymous.
In case of acceptance and publication, we credit all reviewers at the end of the paper when it is published (this is one dimension of "open review", see What is open peer-review?).
However, the author will not receive the name of the reviewer together with the review (unless the reviewer explicitly signs, i.e. puts their name under the peer-review), As a paper usually has more than 1 reviewer, the author will usually not know which review was written by which reviewer.
If a reviewer has concerns about disclosure of their name at the end of a published paper, we can make exceptions if the reviewer requests it; in that case we replace the reviewer name with "Anonymous" in the reviewer credits at the end of the paper.
If a reviewer desires this, the reviewer needs to send a support message to firstname.lastname@example.org with the manuscript number once they submitted the review, and before publication of the paper. Our staff will then post a note for the production department to remove the name before final publication. Once the paper is already published, we usually do not remove the reviewer name.