Exchange rate
An exchange rate is simply the ratio of one currency valued against another currency. To put it differently, an exchange rate is a price paid for one currency in exchange for another.
Base Currency
The first currency on the left is called "base currency"
Counter Curency
The second currency on the right is caled "counter Currency"
The aim of forex trading is simple. Similar to any other form of speculation, you want to buy a currency at one price and sell it at a higher price (or sell a currency at one price and buy it at a lower price) to make a profit. However, it can get confusing as the price of one currency is always, determined in another currency.
In a floating exchange rate system, the value of a currency constantly changes accordingly based on supply and demand forces in the market. These fluctuations in value create an opportunity for traders to trade in the market and profit off it.
As it was discussed before, all the currencies are always quoted in pairs, thus for every transaction in the forex market, you are simultaneously purchasing one currency and selling another.
When opening a buy (long) trade, the exchange rate indicates how much you have to pay in the units of counter currency to buy one unit of the base currency.
On the other hand, when selling (going short), the exchange rate indicates how many units of counter currency you will receive for selling one unit of the base currency.
As a trader, you would buy a currency pair if you believe the base currency is going to appreciate in value relative to the counter currency, and you would sell the pair if you believe the base currency is going to depreciate relative to the counter currency.
Example:
Let’s say you believe that Euro will appreciate in value against the US dollar. Therefore you go ahead and execute a buy order on EUR/USD. Remember as we discussed earlier base currency (the currency on the left) is the basis for buy and sell. Therefore, once you place a buy on EUR/USD, you buy the Euro and sell the US dollar simultaneously.
On the other hand, if you think the US dollar is weakening against the Japanese Yen, then you sell the pair USD/JPY. By doing that you are selling the US dollar that is weakening and buying the Japanese Yen that is gaining value against the US dollar.
You can refer to the table below for more examples of buying and selling.

Summary:
Base currency is the basis for buy and sell. When you buy a currency pair you are buying the base currency and when you sell a currency pair you are selling the base currency.
As a trader, you buy a currency pair if you believe the base currency is going to appreciate against the counter currency. And sell a currency pair if you believe the base currency is going to depreciate against the counter currency.