Can someone tell me how do I know which areas of the song to sing softly and which areas to sing loudly while singing a song.
Think of it as you would a dramatic reading. Ask yourself what you want to communicate to your audience and how you would communicate it.
Better still, don't just think about it, do it. Read the words aloud, not in the rhythm of the music. Get to know the text by itself. Make some dramatic choices.
Then add the rhythm back in. Maybe you'll find you need to make some different choices. That's okay, as long as you have some dramatic goal. Speak the words in rhythm. Try different speeds. Try different volumes. Try different emotions.
Finally, take those experiments back to the melody. You probably won't need more advice at this point; you'll have a good idea how to apply the ideas you've considered to the song. But think about frustrating the audience's expectations. Even within the context of a single emotion, you can provide contrast by varying the intensity of the emotion.
Is it an excited song about some good news? Perhaps one section can be quieter, perhaps more about optimism than joy. Is it a quietly cynical song about someone's hard life? Perhaps one section can be more about loud defiance or anger. Look for clues in the music: a good composer will help you out here. But start with the text. It's all about the message.