Best way to train Neural Network for Voice Commands?
What Neural Network does it learn from your input and output and creates a best algorithms.


This is inaccurate. A neural network is a function approximator, so it approximates an unknown function. However, it does so in many cases by learning from your input and output(as in the case of supervised learning). The function your approximating would here for example be the function that maps a certain soundwave input to "open camera", etc.

The problem with supervised learning is that you need massive datasets to accurately approximate the target function - luckily for Google they have such datasets and resources available.


  Is Google also Hard-Coded the commands for Google Voice Assistance?


No, because that would not generalize well over multiple languages/accents/background noise, etc. It is therefor that neural networks as function approximators have had such a large impact over the last years - they generalize well.
If you remember when the first "voice assistance" products came out, they rarely functioned - this was often due to them being "hard coded", with only static measures for noise-suppression.