A forced reflow happens when JavaScript makes the browser calculate the page layout right now, instead of waiting until it is ready to draw the next frame. Layout is the step where the browser works out the size and position of every element. Normally the browser batches changes and does this once, at a convenient moment.
The trigger is a specific pattern. Your code changes something that affects layout, such as an element's width, a class name or some inserted text. Then, before the browser has recalculated anything, your code reads a value that depends on layout, such as an element's height, its offset position or its bounding box. To give you a correct answer, the browser has to stop and run the layout calculation immediately. That calculation is the forced reflow.
One forced reflow is usually harmless. The cost grows with the size and complexity of the page, because layout work scales with how many elements are affected. On a large page, or on a slow phone, a single reflow can take noticeable time and delay the next paint, which makes the page feel sluggish.
A common confusion is thinking that reading a layout value is always cheap. It is only cheap when nothing has changed since the last layout. Reading right after a write is what makes it expensive. The usual fix is to group all reads together first, then make all the writes.
An example: a script sets a banner's text, then immediately reads the banner's height to position a button below it. The read forces the browser to lay out the page on the spot. Done in a loop, this becomes layout thrashing.
Related: Layout Thrashing, Core Web Vitals