First, you have to realise that there are two completely separate electronic items in the key.
One is the transponder. This is part of the immobiliser system, and identifies the key to the immobiliser once the key is inserted into the steering column lock. It is a passive component, not powered by the battery: it is read by a coil surrounding the end of the steering column lock in a manner similar to RFI anti-theft tags.
As part of the immobiliser system, these devices are not meant to be disturbed, moved from one key to another, or otherwise mucked about with.
The transponders come in at least two varieties.
One is a glass tube with electronic components inside. If you break the glass it stops working.
Another looks like a small rectangular piece of plastic and has electronic components buried in it. The plastic is fragile and will crumble if mishandled, which will stop the transponder working.
The transponder is usually glued firmly into the key next to the blade.
The transponders in the keys that came with the car have been registered into the immobiliser system, which is on the dash circuit board. The immobiliser system is paired with the ECU. Change any one of these (transponder, dash circuit board or ECU) and you have to register the new component. This is to make the car harder to steal.
Many posters on the forum have successfully transferred transponders from one key to another. However it isn't meant to be easy so there is a risk that you will break it. Don't try it if you only have one key that works.
You can buy a new, unregistered, transponder, to fit to your key, and then get it registered with the car. VAG-com may be able to do it, and a dealer certainly can. You will need the SKC, the Secret Key Code that you should have got with the car when you bought it, attached to a plastic tag along with the keys.
The second electronic item is the remote central locking/alarm control, usually contained in the keyfob which can be removed from the key blade+transponder. This is powered by the battery in the key and sends a low-powered radio signal to the car's alarm/central locking unit which is part of the convenience module. A new remote control can be registered with the car by a well-known process using a second valid key.
The remote control in the key you have bought may or may not work with your car. It will depend on the frequency used by the fob.