A drill came with these parts. I've tried searching for them but I don't know what keywords to use.
They are each a bit longer than an inch.
Those are replacement brushes for the electric motor in your drill. They are what make the electrical contact to the coil in the motor that spins, while also allowing it to spin. The rectangular part on the end will eventually wear out. It's nice of your drill manufacturer to give you a set of spares.
You can swap these out either by removing a couple of plugs somewhere on the drill body, or if there are no plugs, you'd have to remove the drill's case and get to them that way. The plugs are usually round and have a slot for a screwdriver, they simply unscrew to expose the brush.
If this is a new drill, this should be explained in the instruction manual.