The model is not training since the graph shows the loss is not decreasing, and the goal of a ML model is to minimize the loss between the actual and predicted values. If the model were training correctly, you would see a decrease in the loss as the epochs go up (it may still be a bit noisy, but it will be a notable decrease).
Onto the overfitting part, say you have 10000 samples. Use only 100 of them and train your model on that subset. Play around with number of hidden layers, number of neurons in each layer, different optimizers (and their parameters) until you can achieve near perfect accuracy. The reply to this question 2 gives a comprehensive in-depth explanation.