1.
Microsoft SQL Server Management Studio -> SQLServer name-> database -> database name-> right click -> property - >Permission
User/roles -> select guest -> un-check "connect"
2.
USE
GO
REVOKE CONNECT FROM GUEST
GO
Reference
SQL Server Database Guest User Account