There are many ways to write loops/iterative/repetitive behaviour in elisp.

<kbd>C-h</kbd><kbd>i</kbd><kbd>g</kbd> `(elisp)Iteration` has the basic options, including `dotimes`, which is the canonical way to repeat something N times.  E.g.:

    (dotimes (_ 10) (insert "X"))

For the specific example of repeating a character N times, you might alternatively use `make-string`.

    (insert (make-string 10 ?X))