Unless the journal specifies a particular format, it's almost entirely up to you.
Here's a formula that has worked well for me. The goal is to convey that a) you've taken the feedback seriously and b) show how the manuscript has changed in response, so that the decision-makers can quickly and easily accept it--hopefully!
Start with a short summary of the reviewers' comments and the changes made in response to them. This should highlight any major themes: "All three reviewers asked about X, so we performed experiment Y and analysis Z; two reviewers asked us to comment on A in light of B, so we've added a new section to the Discussion on page 9". This does not need to be comprehensive, but should serve as an overview for the editor.
Next, go point-by-point through each reviewer's comments. I reproduce whatever they've written (in a distinctive font/color), and then write my response to that point below it in another style. These responses vary in length: a simple "fixed" is fine for comments about typos or minor errors. A major point might require an entire page, possibly with a bespoke figure. If you have changed the manuscript in response to address this comment, include the location of the changes (e.g., "Discussion, p. 9--10"). If the change is 1--2 paragraph or less, quote the revised text in the response too.
If the review is "free-form" text, break it into discrete "issues" however you see fit, but do not remove or paraphrase text and try to keep the points in the same order. Some people number them, using RX.Y to refer to the yth comment raised by Reviewer #x.
Write something for every comment. If you feel certain that the reviewer is incorrect, it may be tempting to rant about their apparent ignorance. I would avoid doing this unless it's an objective, factual error. Instead, consider the possibility that there's a germ of a good idea, badly expressed, or that the writing failed to properly convey your own brilliance. At the very least, your text can often be revised to make points more clearly.
Try to make each Reviewer's section self-contained. If a reviewer repeatedly returns to the same point, it's fine to occasionally say "As mentioned above in R1.4", especially within a single reviewer's section. If several reviewers ask for a small change, I would just list them in each section. Prefer repeating "We now include the participant's ages, heights, and weights on page. 9 [quote]" to "See R1.3." For longer responses, references are fine but if multiple reviewers have the same major comment, address it in your overview. Some of your responses may rely on specific data from references. It's sometimes helpful to include relevant quotes or figures from those. Give the citation as well, obviously.
Here's a complete example of this format from one of our papers. A growing number of journals now publish peer review files, so it might be worth checking whether examples are available from your field or target journal.