If the server is remote you may have to set up an Alias for the remote server first (how to do that depends on what version of SQL you are using; in modern versions its in "SQL Server Configuration Manager", that allows you to specify TCP/IP or something else, IP Address, etc.), then you can set up a Linked Server in SSMS or Enterprise Manager (old versions of SQL) using that Alias name, and then once you have done that you can useSELECT Col1, Col2FROM LinkedServerName.RemoteDatabase.dbo.TableName
however, you may find performance using that 4-part naming style if not good enough, so you make need to use something like OPENQUERY insteadSELECT Col1, Col2FROM OPENQUERY(LinkedServerName, 'SELECT Col1, Col2 FROM RemoteDatabase.dbo.TableName')