Understanding Training and Test Loss Plots
Assuming that the train and validation sets in the curves under comparison are the same, the best curve is probably the one with the lowest validation loss value.

Numbering your figures from left to right and from top to bottom, I would say the best one is #5 (second row, second column).

Now, let's break down what is going on in each plot:


Very high values, seemingly random, no decrease whatsoever in either train or validation losses: the model is not learning; probably there's something wrong with either the model or the optimization process, or maybe some hyperparameter value is terribly wrong.
Descending values for both training and validation losses, with validation loss having a gap with the training one, and both stabilized (i.e. neither of them will probably go any lower -if in doubt about this, leave them more training time-): training seems Ok, but there is room for improvement if you regularize your model so that you get your training curve upper and the validation one lower.
Initially, both curves descend, then validation starts going up around step 800: overfitting. You should try regularizing the model and, if that's not effective, use early stopping to use the model that performs best on the validation data. You may also try with some hyperparameter tunning, or having a learning rate schedule that makes it smaller with time.
Both curves are descending and it seems they will keep doing that for a while: training is not finished, leave it training more time.
Both curves descend, despite the initial plateau, and reach a low point, with no gap between training and validation curves: you can probably improve the model weight initialization. Anyway, this plot seems the best, as the validation curve reaches the lowest value and there is no overfitting.
Both curves go up: there is something wrong, probably in how you define your loss function optimization process.


I don't see any clear case of underfitting among your plots. In an underfitting scenario, we would see that the model learns something but both the training and validation losses stabilize at too high values. This would suggest a lack of capacity of the model, preventing it to properly capture the data distribution with respect to the labels.