What Oracle version do you use?
Usually it is made using direct editing tnsnames.ora file (default location for Oracle 10g client = C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN\tnsnames.ora) or GUI tool -> Net Configuration assistant.
Example of connection alias from my tnsnames.ora file:
ORADB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.50.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora10gdb)
)
)
ORADB - alias name, you use it as a db name when you connecting to a database from your environment
HOST - is a server host name
PORT - is Oracle service port name (1521 is a default port)
SERVICE_NAME - is a oracle database instance service name (can be more than one database instance on same server behind same port)