Alec's answer covers how it manifests, but it is commonly caused by things such as stress and PTSD, as this article from a former competitive gymnast describes (though it arguably also assumes quite a lot about Biles' state of mind)
There are many causes, but one of the most common is stress or PTSD, the symptoms of which Simone was starting to display over the last several days, not only in the way she overcooked her routines in the qualifying rounds, but also in her texts and Instagram messages.
This is where I blame myself, the media, our expectations, our projections, and so on for Simone’s sudden onset.
As an insider, I’m well aware of the insane amount of pressure being applied to her. Even the scandal-ridden selection of the women’s Olympic gymnastics team was Simone-centric; the vanity being that it didn’t matter which of our superlative athletes were ultimately placed on the team, since Simone would save the day, regardless.
As for how long it can last - some people recover from it, some are plagued by it for the rest of their career:
I also suffered from the twisties, one time landing on the back of my
neck during a multiple flipping skill as a result. That experience
directly and adversely impacted the rest of my career. I was
constantly petrified, constantly doubting myself.
Doubt is the leading cause of injury in gymnastics and I have a dozen
surgical scars to show for mine. If Simone, a national treasure,
enters the remainder of the competition with doubts, and is injured,
that injury is on all our shoulders for the reasons I’ve stated above.
So I don't think there's a typical timeframe for recovery.
The wikipedia article on The Yips, most commonly known from golfing, also describes manifestations of similar issues in other sports.