If you write an HTML/JS, it will always run on all architectures.
If you write a .NET/XAML app, by default it will be compiled to a CPU neutral IL that runs on all architectures (you can disable this and target a specific CPU architecture).
If you write a C++/XAML app, by default Visual Studio will compile different versions of the app for each architecture.
For the vast majority of Win8 apps, "converting" to ARM is just a cross-compile. It is only when you are doing very specialized things that you actually need to worry about the CPU architecture your app will be running on.
Does that mean if there's an open source application you like, all you have to do to get it on your Surface is open the source code in the latest edition of Visual Studio, recompile it, transfer the files to your Surface, and you will be able to install and run it?
Unfortunately no because chances are this open source code is using some parts of the Win32 API that are not supported by WinRT, so you would have to replace the invalid API calls by the new (probably asynchronous) ones... Maybe even completely rewrite the GUI if necessary.
If you write a .NET/XAML app, by default it will be compiled to a CPU neutral IL that runs on all architectures (you can disable this and target a specific CPU architecture).
If you write a C++/XAML app, by default Visual Studio will compile different versions of the app for each architecture.
For the vast majority of Win8 apps, "converting" to ARM is just a cross-compile. It is only when you are doing very specialized things that you actually need to worry about the CPU architecture your app will be running on.