A sentence would be really helpful here - you should always give us a complete sentence if at all possible. But what "coughing your/my/our lungs out" usually means is "coughing extraordinarily hard." It's hyperbole - the person doesn't literally cough his lungs out, but he coughs very hard.
"She was coughing her lungs out" is a usage similar to "she was crying her eyes out". These are just expressions meaning coughing very hard or crying very hard; neither her lungs nor her eyes were coming out of her body.