Facebook applications can be created almost every language that is popular these days, but officially only php5 is being supported. You can host your application on any web server which supports php.
The creation of facebook application is a straight forward process with quite a lot of help available from facebook wiki itself. You need to go to developer site to setup your application: http://www.facebook.com/developers/ Once you've setup your application you will be given API key/secret key, that you've to use in your code in order make it work.