I doubt I'm alone in being a bit confused about what the heck Webpack is and does. Even if you're actively using a project that uses it! We're just going to scratch the surface here, but hopefully while talking it out in a way that will make sense to you.
One thing that helps me think about (a little, anyway, I'm no expert) is that while you do need to configure Webpack, you aren't telling it specific instructions like "take this file and this file and squish them together". It gets those instructions from your code itself, because Webpack actually reads your code and follows the dependency needs it finds.