Destinations
You can create and administrate HTTP/S destinations from the Admin UI. A destination is associated with a name, which is used from the code to reference a named destination.
A destination can be associated with authentication settings also, like Basic Authentication, API Keys or OAuth2 Client Credentials.
These are found here:

A destination is assigned a unique name.
Using a Destination
To use a destination from your code, you will reference the destination by name when obtaining the request builder from the HttpAPI
as shown in the code snippet below:
context.httpAPI()
.newRequestBuilder('the-name-of-your-destination')
// configure request more..
.build()
.perform();
This will populate the RequestBuilder
with all settings from the destination.
You can then further on add more things to the request builder like appending more headers or more parameters or settings the request body for example.