Forex is a contraction of "foreign exchange" and means the same thing as FX (foreign exchange): the exchange of one currency for another, and the market in which that takes place. The main entry covers how currencies are quoted, who trades them and why. Banks, corporate treasurers and regulators tend to say "FX" or "foreign exchange", while "forex" is the usual word in retail trading and in the names of online brokers.
In its retail sense, forex refers to speculation on movements in a currency pair through an online platform, often with borrowed money. The trader does not usually take delivery of any currency. Positions are held as rolling spot contracts or as a contract for difference with the broker and are settled in cash. Regulators in many countries limit the leverage offered to individuals and require brokers to publish the share of client accounts that lose money, which is typically a large majority.
The wholesale foreign exchange market behind these platforms is the largest financial market in the world by turnover and is measured every three years in the BIS Triennial Survey. Retail activity is a small part of it. The related entry FX trading describes the trading activity itself.