The gear is press fit onto the shaft. However, if someone glue it, you may not be able to get it off. I used a silicon chalking type adhesive on mine. That way I could remove it if necessary.
Modeling the B&M Railroad during the transition era in Lowell, MA
The gear came right out, it is on a shaft between a movable wall and a fixed wall where the bushing is. It is possible that it is a press fit when assembled, if so, bad design but then I guess that never expected the gear to get damaged, don't know how it did as I got the TT second hand, only thing wrong was this, which I can live with if I have to.