This is my two cents (pun intended). It was too long for a comment, so I tried to make it more of an answer. I am no expert with investments or Islam:
Anything on a server exists 'physically'. It exists on a hard drive, tape drive, and/or a combination thereof. It is stored as data, which on a hard drive are small particles that are electrically charged, where each bit is represented by that electric charge. That data exists physically. It also depends on your definition of physically. This data is stored on a hard drive, which I deem physical, though is transferred via electric pulses often via fiber cable. Don't fall for marketing words like cloud. Data must be stored somewhere, and is often redundant and backed up.
To me, money is just paper with an amount attached to it. It tells me nothing about its value in a market. A $1 bill was worth a lot more 3 decades ago (you could buy more goods because it had a higher value) than it is today. Money is simply an indication of the value of a good you traded at the time you traded. At a simplistic level, you could accomplish the same thing with a friend, saying "If you buy lunch today, I'll buy lunch next time". There was no exchange in money between me and you, but there was an exchange in the value of the lunch, if that makes sense. The same thing could have been accomplished by me and you exchanging half the lunch costs in physical money (or credit/debit card or check).
Any type of investment can be considered gambling. Though you do get some sort of proof that the investment exists somewhere Investments may go up or down in value at any given time. Perhaps with enough research you can make educated investments, but that just makes it a smaller gamble. Nothing is guaranteed. Currency investment is akin to stock market investment, in that it may go up or down in value, in comparison to other currencies; though it doesn't make you an owner of the money's issuer, generally, it's similar. I find if you keep all your money in U.S. dollars without considering other nations, that's a sort of ignorant way of gambling, you're betting your money will lose value less slowly than if you had it elsewhere or in multiple places.
Back on track to your question:
[A]m I really buying that currency? You are trading a currency. You are giving one currency and exchanging it for another. I guess you could consider that buying, since you can consider trading currency for a piece of software as buying something.
Or is the situation more like playing with the live rates? It depends on your perception of playing with the live rates. Investments to me are long-term commitments with reputable research attached to it that I intend to keep, through highs and lows, unless something triggers me to change my investment elsewhere. If by playing you mean risk, as described above, you will have a level of risk. If by playing you mean not taking it seriously, then do thorough research before investing and don't be trading every few seconds for minor returns, trying to make major returns out of minor returns (my opinion), or doing anything based on a whim.
Was that money created out of thin air? I suggest you do more research before starting to trade currency into how markets and trading works. Simplistically, think of a market as a closed system with other markets, such as UK market, French market, etc. Each can interact with each other. The U.S. [or any market] has a set number of dollars in the pool. $100 for example's sake. Each $1 has a certain value associated with it. If for some reason, the country decides to create more paper that is green, says $1, and stamps presidents on them (money), and adds 15 $1 to the pool (making it $115), each one of these dollars' value goes down. This can also happen with goods. This, along with the trading of goods between markets, peoples' attachment of value to goods of the market, and peoples' perception of the market, is what fluctates currency trading, in simple terms. So essentially, no, money is not made out of thin air. Money is a medium for value though values are always changing and money is a static amount. You are attempting to trade values and own the medium that has the most value, if that makes sense. Values of goods are constantly changing.
This is a learning process for me as well so I hope this helps answers your questions you seem to have. As stated above, I'm no expert; I'm actually quite new to this, so I probably missed a few things here and there.