There are many products out there for sub roadbed and ballast and most of them are great. I prefer to use cork roadbed for my sub layer and Woodland Scenics ballast for the rock layer.
Woodland Scenics makes different colors and sizes of ballast. It usually comes in a small bag, pictured above, or in a larger shaker canister. My ballast of choice is Medium Dark Brown. I know the picture shows Fiine Dark Brown, but I usually use medium ballast. It's really just a personal preference on the size of the rock.
As a rule, I don't usually ballast track until I have had some operating sessions with my trains and I see that everything is running properly. It's a lot harder to fix defective track when it's sitting in a layer of ballast. One exception to this is in hard to reach places, like tunnels. I check and double check the track by pushing random rolling stock over the track before I ballasting and closing up the tunnel.
To ballast, I sprinkle dry ballast on the track and use artist brushes to smooth it out until it looks the way I want it to look.
That is followed by a fine spray of 75%water / 25% rubbing alcohol. This spray is a wetting agent to help hold the ballast in place during glueing. The alcohol breaks the surface tension of the water and the glue that will be applied next. If you don't break the surface tension, it just puddles and makes a mess. Note - some people will use a few drops of dish detergent to break the surface tension, but I find that to be hit or miss, so I stick with alcohol, which works 100% of the time.
The next step is to apply glue. You can buy pre made scenic glue at hobby shops for crazy amounts of money. You get a product that is essentially diluted white glue. I suggest buying a large bottle of white glue. You can sometimes find gallon jugs of it. Combine into a 50/50 mix with water and you have your scenic glue for less cost. You will need to stir this glue mix before every use, as the glue will tend to separate and settle to the bottom.
Some modelers prefer to spray the glue mixture. I will use that method for large areas of grass scenery, but prefer to use a large eye dropper, which you can find in any pharmacy section of your favorite store. It takes a bit longer, but I feel I have more control and accuracy.
Make sure the entire ballasted area gets soaked with the glue mixture. You can then use a paper towel to wipe the rails while they are wet, or a track eraser to wipe the rails after the glue dries. Don't worry about any glued areas that are white. It all dries clear in the end.
Approximately 24 hours later you will have a hard shell of ballasted track. You should be able to poke at it with your finger and not break anything loose. If it does, that means your glue did not soak in all the way. Respray with the fine mist of water/achohol and glue again, making sure it's soaked all the way down. You can also use this method to fix any missed or damaged spots along the rail.
At this point, I closed up and finished off the top of the tunnel and mountain. I will shave and carve the foam mountain at a later date.