Hi Maureen, it's all pretty straightforward, I assume you mean on Turkish Airlines? Your hold luggage goes straight through, so you don't need to collect it in Istanbul and check in again. You 'arrive' in Turkey at Istanbul so that's where your visa should be purchased and you go through passport control in Istanbul. Then just head of to the domestic terminal to get your internal flight from there to Dalaman. Boarding cards for this leg of the journey, in case you were wondering, are issued with the IST ones (so at Heathrow or wherever)
The only bit to stay alert for is when you come off the IST-DLM plane at Dalaman, most of the people are on a domestic flight and will be directed to the domestic terminal. You however are not a domestic arrival, you are an international transit arrival, and you will be split off (not just you, all transit passengers

) either in a seperate bus or if no need for a bus, someone will shout for transit/international passengers to follow a different route. Unlike all the internal flight folk, you will end up at the international terminal.
I hope that doesn't sound too complicated, it might be in words but in reality it's pretty easy.