"Refurbished" by Apple can mean almost anything. If it's been previously used in any capacity and returned, Apple won't released it to another customer unless it's refurbished. It could be something as simple as one that was returned within Apple's 14-day return period, but then checked over with a new battery installed. It could be one where it was sent in for repair and Apple exchanged it and refurbished the exchanged device for the next guy. Or at least salvage as many parts as possible to reassemble into refurbished devices. They can have new parts though, like cameras, speakers, or even logic boards. A lot of what Apple does is reuse as many parts as possible, with the exception of the battery which will always be new. But what Apple can do is modify the serial number and the model number, which third parties can't do.
Apple's refurbished devices become either retail refurbished (model number starting with F) or replacement (N).
A third party might do what they call refurbishing. There might have been damaged parts that were replaced with aftermarket parts - especially the front screen assembly. They might have an aftermarket battery. But the one thing they can't do is mimic Apple's system for changing the model number.