A lucid dream is one in which the person is aware they are dreaming.
It is a fascinating topic to read about. I'm not an expert, but relatively common medical knowledge suggests that quite simply, you would wake up at some point. I "think" you can dream you are in a coma
as part of a lucid dream, but again, at some point, yoiu would wake up in the usual fashion.