OK- what this sounds like, is possibly your driver door latch is not recognizing the "door open" signal- and so if you use the remote to disarm the alarm and unlock the door, if it does not see that signal within about 20 seconds, it relocks the door and arms the alarm again. Try unlocking the passenger side door with the key, and see if the flashing LED on the driver door stops flashing (alarm armed)
The dome light (in the Beetle, the light on the bottom of the rearview mirror) normally comes on when you open the door (if the switch is set to that position) and that is how you can test to see if the latch is OK or bad. Set the switch to come on with "door open" and then try opening the driver door and see if it comes on, try opening the passenger door and see if it comes on, etc. With the key off, the light will take about 15 seconds to turn back off again, if you could have the key on without the alarm going off the light will come on and go right off when you close the door again.
If this does not work, then you may need to unlock both doors, put the key in the driver door and turn it to the unlock position, and then disconnect the battery negative terminal for about a minute or so. Then reconnect it, and if the alarm sounds when you reconnect the battery, turn the key in the lock. Hopefully this will reset it if the system is "confused"