Hoppe's #9 is sold as 'nitro powder solvent'. The primary purpose it does is to dissolve the residue of burnt gunpowder in the barrel, action and where ever else it gets. It's not bad to assist in removing jacket fouling and plastic in shotgun barrels. I use it for that purpose on both guns (and magazines) and on fired brass while I'm tumbling them to remove all the grit and gunk that wear out dies. Clean brass is also easier to inspect for cracks and such.
Once clean, a firearm needs both lubricant and some form of rust protection. "Oil" serves both these functions at once. But a little goes a long way. Some folks use a grease type lubricant on the fast moving rubbing parts, like slides to frame, bolts to receiver and operating rods; and then lighter oil on surfaces subject to rust and slow moving parts like interior clockwork of a revolver and the sear and such of a self-loader or rifle.
And a firearm needs to be scrubbed out every so often to remove all the congealed and - over time - dust impregnated oil residing therein. Moving parts do get sticky when not exercised regularly.