That appears to be the dust cap to your hub, which is normally way inside. The hub may be ruined, as for that to be pushed out means there was some other problem already existing. At a minimum the freewheel needs to be removed and hub disassembled (special tools required) and the hub parts need to be inspected. Possible a hub overhaul would fix it but a new wheel may be required.