Spray down the gap between the flooring and the fireplace with a household cleanser. Wipe down the area with paper towel, getting up all the cleanser. Tuck the paper towel into the gap and run it along the length of it so no moisture remains in that space.
Put a caulk tube in the caulk gun. Use a utility knife to cut off the end of the tube at a diagonal angle so the hole in the tip is about a quarter-inch across.
Slide a long nail into the hole and break the seal inside, releasing the caulk. Compress the trigger until caulk comes out the end.
Place the tip of the tube against one end of the gap between the flooring and the fireplace molding, while holding the gun at a 45-degree angle. Compress the trigger until the caulk comes out and starts to fill the space.
Drag the caulk gun slowly back along the line, letting the caulk fill the gap. Run the gun along the whole length of the line, keeping the caulk smooth and even.
Run your thumb along the freshly laid caulk, smoothing it out. Repeat for each line where the floor meets the fireplace.