Mapping output neurons to classes
In multiclass classification problems, the number of output units (i.e. neurons) is equal to the number of classes. Only in binary classification, you have 2 classes but just 1 output unit.

The mapping between output units and classes is decided by you. You assign each class an index from $0$ to $N-1$, where $N$ is the number of classes. This values (or one-hot versions of them) are what you supply as expected output to the loss function. Output units form a vector of size $N$, with each unit being at a specific position in that vector. The unit at position $i$ represents the class with index $i$.

The output of the softmax is also a vector of $N$ probability values. The probability at position $i$ represents the probability of the input data belonging to the class with index $i$.