After compiling your source code you need to create a .war or .ear file depending on the contents and purpose. Then you should deploy (install) this file on the target server. Usually (also in JBoss) this can be done using tools that are provided by the Application server provider.
The JavaEE tutorial will be a good starting point for getting an understanding to this topic (Java Platform, Enterprise Edition: The Java EE Tutorial Release 7 - Contents)
But Netbeans provides also some very basic example. Using Netbeans it might even be simpler to get the application running. Just configure the Server (via Services -> Servers) and assign this server (eg WildFly Application Server) to your project.
In the Projects tab select your project and just select build, deploy or even run.
It depends on the version of JBoss. For AS7 there are some quickstarts.
But I recommend to use WildFly instead as this is the successor of JBossAS. Here you will find quickstarts as well that give you an idea. See wildfly.org.
In any case you need to decide whether you start with a web (browser) base application, web services or a rich client which use EJB or webservices.