Let $A,B$ be adjacent vertices of a regular $n$-gon ($n\ge5$) with center $O$. A triangle $XYZ$, which is congruent to and initially coincides with $OAB$, moves in the plane in such a way that $Y$ and $Z$ each trace out the whole boundary of the polygon, with $X$ remaining inside the polygon. Find the locus of $X$.
1. **Identify the initial setup:**
   - Let \( A \) and \( B \) be adjacent vertices of a regular \( n \)-gon with center \( O \).
   - The triangle \( XYZ \) is congruent to and initially coincides with \( OAB \).

2. **Movement of \( XYZ \):**
   - As \( XYZ \) moves, \( Y \) and \( Z \) trace out the boundary of the polygon, and \( X \) remains inside the polygon.

3. **Consider the movement from \( OAB \) to \( OBC \):**
   - Let \( C \) be the vertex adjacent to \( B \) (and not equal to \( A \)).
   - As \( XYZ \) moves from \( OAB \) to \( OBC \), the quadrilateral \( XYBZ \) is cyclic. This is because \( Y \) and \( Z \) are vertices of the polygon, and \( X \) is inside the polygon.

4. **Determine the locus of \( X \):**
   - Since \( XYBZ \) is cyclic, \( X \) lies on the bisector of \( \angle YBZ = \angle ABC \).
   - \( X \) is the intersection of a circle passing through \( B \) (the circumcircle of \( XYBZ \)) with a fixed radius (the radius is a function of \( \triangle XYZ \)).
   - Therefore, \( X \) varies along a line segment ending at \( O \).

5. **Generalize for all movements:**
   - When \( Y \) and \( Z \) pass through the other sides of the polygon, the locus of \( X \) consists of \( n \) distinct line segments.
   - Each line segment passes through \( O \) and is contained in \( OV \) (but not in \( \vec{OV} \)) for some vertex \( V \) of the polygon.
   - Each pair of these lines is obtained from one another by a rotation with center \( O \).

Conclusion:
The locus of \( X \) is \( n \) distinct line segments, each passing through \( O \) and contained in \( OV \) for some vertex \( V \) of the polygon.

The final answer is \( \boxed{ n } \) distinct line segments passing through \( O \).