We can model distributions using neural networks in two ways:
Deterministic way
In this way the output of neural network is a sample from the distribution.
Probabilistic way
In this way the output of neural network are parameters of the distribution.