Connecting your computer to WiFi connects it to your home network ... connecting your home network to the internet requires an extra step.
We don't know how you get your internet connection, but if you live in the United States or Canada, the most common way to get connected to the internet is with a router. If that's true in your case, and the router came from your Internet Service Provider, ask the ISP how to connect it to the internet. If you purchased a router on your own, it's slightly more complicated.
Every router from the major manufacturers ships with an owner's guide that begins with illustrated instructions for connecting the router to the internet. Follow those instructions and you should be all set.
(In my personal experience with this community, people sometimes err in trying to setup an internet connection through Windows. Your router - if that's what you have - is what connects you to the internet, and so your internet setup should go through the router.)