How do I fix this

My girlfriend's bike has this issue where when she's pedaling it starts free spinning as if something in the rear gearing is alternately grabbing and not grabbing... Sorry for the lack of technical jargon, I've never had to fix a bike before.

I'm just curious what is the best way to repair this, and how hard is it.