The currency market is the most liquid and mature securities market on the planet as a result of its relative age. To that end, brokerages have automated this trading process for their clients.
To long one's own currency vs another currency, one only need to enter the proper trade. In a forex account, the distinction of one's home currency is largely lost.
As with any currency, to long a currency thus short another, a trader simply borrows the shorted currency much like with a more commonly known short stock sale and simultaneously sells it to buy the long currency all while posting a margin in excess of the loan.
As with equities, the forex market has benefited significantly from electronic trading and algorithmic market makers with collapsing round lot sizes and spreads, typically 1/2 pip and lower for larger traders and specialized brokers/exchanges. Odd lot exchanges have arisen providing trading for any size below the current conventional round lot minimum of ~$25,000, albeit for a higher minimum spread.
While one can use derivatives to trade forex, the most liquid trade is the spot market using the process described above. Because of the relative stability in the large currencies for the past few decades relative to the century before, margin rates for forex are the largest publicly available.
Indeed, a trader does pay interest on shorted currency while receiving interest on the longed currency, explaining the appeal of the so-called "carry trade", where a trader shorts a currency with lower borrowing costs to benefit from the higher interest rate of the longed currency.
Example Trade
In the case longing USD against JPY, a trader would select the relevant currency pair but must be careful to select the correct one since currency pairs are structured both ways to a trader for convenience, such as USDxJPY to long JPY against USD and JPYxUSD to long USD against JPY. For more flexibility, the broker allows a trader to long or short either pair, but at root there are only two transactions for the four presented: borrow USD to buy JPY or borrow JPY to buy USD.
The convention is usually to present the selling currency first, then a symbol, then the buying currency, and finally the numerical fraction only of the buying currency divided by the selling currency, but brokers may use any convention they wish and regulation can vary by jurisdiction.
To enter a long USD/short JPY trade, a trader would look for the long USD/short JPY pair and buy to open. So long as the trader has the required margin, the trade will post like any other common order on the relevant exchange, and the broker will provide the sufficient borrowed funds. To close it, the trader could select the same pair and sell to close. If a brokerage approves of shorting against the box, a trader could perfectly hedge the position by buying to open the opposite currency pair.