Foreign Exchange (FOREX) in all simplicity - as it is easiest understood, IS the TRADING of currencies.
Think of it as TRADING rather than buying or selling, trust me, it makes more sense that way.
Imagine it was one of those CARD games where you traded cards with your friends, always trying to get the better card or a more valuable card.
Just like FOREX. You are pretty much looking at your deck of cards and thinking what card would I rather have at this point in time.
So lets say the DOLLAR card is becoming the must have card (it is rising in value) you buy that card in exchange for (TRADE) a EURO card and as it appreciates in value you benefit from having the better card (you make money) YOU then close your trade to take your profits and begin thinking about how you can play the game again.
The same applies in the reverse direction. However is slightly less logical and might confuse some. You can also TRADE a more valuable card for a less one, in the expectation that is will DROP in value, but in this case you don't buy the less valuable card, You SELL it expecting it to drop which creates the reverse outcome to BUYING the card.
Hope I didn't confuse you with the second paragraph but you get the gist