You have two separate journeys, even if they are on Turkish Airlines. The second flight will not have your name as a passenger and thus your luggage will not be transferred.
In fact, your luggage will be tagged only till Istanbul when you check-in. As far as the airline in concerned, you only have a ticket to Turkey, so you need to make sure you are able to enter Turkey. Either you are exempt, or have applied in advance for a transit visa. This is because you will not be allowed to board unless you are able to terminate your journey in Turkey.
Once you land in Istanbul, you will follow the normal passenger that are going to Istanbul – you will follow the arrivals queue rather than the transit queue. You will most likely have to go through immigration, collect your luggage, go through customs and then enter Istanbul.
Then, simply follow the signs for international departure and check in again at the Turkish airline counter for your next flight. Hand them your luggage, this time they will tag it to Lisbon. Present your passport and flight reservation, get your boarding pass, go through security, immigration and then board your next flight.
Make sure you have sufficient time between flights to complete all the formalities and account for any delays.