You have a walljack/wallplate ethernet jack in your wall. you are plugging a cable into that jack and then into your computer you are not getting internet.
the obvious question here is, is that other end of the cable connected to the wall jack actually connected to the router? it might be connected to nothing at all. there is no way to answer this, only you live in your house and know where your router is located.