one time both of my cats - Panther and Princess, went missing. Panther came back after 2 weeks with a few scratches, scars, and missing tufts of fur, ate at our house, stayed for a week, and then left again. He repeated this for a few months until he stopped coming back. Princess came back after a few months, pregnant. We kept her around, and she gave birth to some healthy kittens. Then we kept one kitten and gave princess and the rest of the kittens away. I don't know why my mom chose to give princess away, but oh well.
Then that kitten grew up to be a piece of stuff, so we gave it to my cousin in Jersey. After a few weeks of living with him, the cat ran away and never came back.
If your cat ever comes back, make sure to hold on to it tight. And like everyone else said, microchips and neutering definitely helps.