Both reviewers and editors are typically chosen by the editors and editorial board of a journal. The most common way to become a reviewer for a journal is to publish in that journal. Becoming an editor requires being a well recognized (i.e., highly published) researcher in your field.
Beware of predatory journals that offer you an editorship when you have never heard of the journal in question.