Taming Overfitting: Unraveling the Magic of Dropout in Neural Networks