All trades result in the buying of one currency and the selling of another, simultaneously.
The objective of currency trading is to exchange one currency for another with the expectation that the market rate or price will change such that the currency pair you have bought has appreciated in value relative to the currency you have sold. If the currency you have bought appreciates in value and you close your open position by selling this currency, or effectively buying the currency that you originally sold, then you are locking in a profit. If the currency depreciates in value and you close your open position by selling this currency, or effectively buying the currency you have sold, then you are realizing a loss. Buying a currency is synonymous with taking a long position in that currency. Selling a currency is synonymous with shorting that currency.