An autoclicker clicks button over and over while you hold a button, as shown in this video. There are two ways to set one up: pick the ready-made one from the action library, or build your own from scratch.
Use the ready-made Rapid Fire
Pick the profile and the button, as in Customizing a profile's button mappings. Click the mapping bar to open the action library, type "rapid", then click Rapid Fire (Left Click).

It clicks every 100 milliseconds while the button is held, and stops when you let go. Click Save to send it to the mouse.
You can adjust the click speed, or change the button which is clicked by editing the output. Just click directly on the "Rapid Fire (Left Click)" output to open the output list where it can be edited.
There is also a Pressure Rapid Fire (Left Click), in the same list, clicks normally, and starts rapid firing when you press the button harder (a deep click). But it's only available on buttons with deep click.
Build your own
To build an autoclicker from scratch and understand how it works. Click the action's name on the mapping bar to open the output list; see How to create Macros for how they work.
- In the Press list, delete any outputs already there, then add a Mouse > Mouse Click output set to 1 (Left Click) and Tap.
- Click + Add output action and add a Repeat / Wait / Stop / Alternate > Wait. Set how long to wait between clicks, for example 50 milliseconds.
- Add a Repeat From, with Output ID# 1 and Times 0.
- 0 repeats until something stops it. Any other number clicks that many extra times, then stops by itself.
- In the Release list, add a Stop Looping output, so the clicking stops when you let go of the button.
The finished mapping looks like this:

Without the Stop Looping in step 4, a Times value of 0 clicks forever. Switching profile also stops it.
To make it start and stop with a single press instead, or to learn more about repeats, see Using "Repeat From" to loop actions in a macro.