There’s nothing tricky going on here. The * operator is used to multiply the different variables and ** is the power operator we need to square r. We could have also written r * r.
The parentheses in the grav_force formula are only there to make the code more readable by separating the upper and lower parts of the fraction. They are optional in this case (parentheses can have an effect depending on the equation).