To struggle physically, to writhe or squirm attempting to escape or move (intransitive).
魚が網の中でもがいている。
A fish is wriggling in the net.
森で足を取られて、もがいてやっと抜け出した。
I got stuck in the woods, struggled, and finally got out.
刑事に取り押さえられてもがいたが、逃げられなかった。
He struggled when the officer restrained him, but couldn't escape.
To act frantically or make desperate efforts to overcome a situation; to struggle (figuratively).
借金返済のために彼は必死にもがいている。
He is desperately struggling to pay off his debts.
彼女は自分の殻を破ろうともがいているところだ。
She is struggling to break out of her shell.
就職難に直面して若者たちはもがいている。
Facing employment difficulties, young people are striving desperately.