Those usually slide in from one end of the track, and usually have a spine, or a bead at that edge that can't some out of the track because it's too wide to slip out the slot. The fact that it came out may mean that bead has slipped out the other side, or may mean the slot widened, which is probably the case. If you can take off the fabric, carefully squeeze the slot to its original dimension, then slide the fabric bead back along the slot, you might have a good shot at fixing that. If it came out by force, it likely opened the slot up and probably won't stay back in if you just force it.
If you don't feel comfortable doing all that, an RV service center can probably get it done. A new track might be necessary. If they are going to fix it and guarantee the repair, they will likely want to use new part(s). As long as it didn't tear the fabric, you should be able to re-use that.
2006 Jayco Seneca 34SS
2006 Jeep Wrangler Unlimited Rubicon Toad