Where do I use T-sql for SQL Server?
where do I input these commands? Is it command line?


You can use these commands in a variety of tools that connect to SQL Server these include :


SQL Server Management Studio.
SQLCMD (Command line tool) 
SQL Operations Studio, (Now SQL Azure Data Studio) 
Power Query tool in Excel. 
Powershell
SQL Developer
Toad for SQL Server


Pretty much any tool that allows you to connect and issue SQL commands.