It depends what feature your router has. Your router will need to have either some for of firewall or parental control feature. If it does generally all you do is type in the ip address of the site you want to block in the proper screen.
Very inexpensive routers do not have features like this so it all depends on your router.