It's a matter of context. seeing lot's of examples will help you figure it out eventually. I'll give you some, hope they help:
دلم درد میکنه. باید برم دکتر. (my abdomen hurts. I should see a doctor)
من دل اینو ندارم که انقدر ناراحت ببینمش. or من دلم نمیاد انقدر ناراحت ببینمش (I don't have the guts to see her so sad)
of course "guts" wouldn't be a good translation, "I can't see her so sad" is better.
یکم دل و جرئت داشته باش، حرف دلت را بزن. (here we have 2 meanings. del always means courage if it comes with "Joreat" which has almost the same meaning. the second sentence, "harfe del-et ro bezan" means say what's in your heart. although here del means heart, if you want to refer to your heart medically, as an organ in your body, you cannot say del. in that case del always means abdomen, you must say "قلب" instead. like "قلبم درد میکنه".)
دلم براش میسوزه. (my heart aches for him; I feel sorry for him)
نرو تو دلش. or دلشو خالی نکن. (don't discourage her; don't scare her)
these are just a few examples. there are many more. if you're a beginner, don't worry about it right now. just learn them one at a time, and memorize them in context. if you're an advanced learner, you'll figure it out if you get more exposure to the language. reading and listening more can help.