What happens when a foreign object inhaled into the lung if it isn't taken out?

A lot of things. Worst case, large enough objects can close the windpipe, cause suffocation and death. Smaller objects can cause infection, pneumonia, lung abscess, chronic cough, chronic phlegm, coughing blood, collapsed lung, recurrent fever, wheezing, chest pain ...Etc. In some cases, if small enough, nothing happens.
Variable. Inhaled foreign objects in the lungs are often coughed out if they are small. Larger ones or infected bodies can cause symptoms until they are removed (looking like asthma or causing pneumonia or an abscess). It depends on the health of patient, the material inhaled, where it sticks in the lungs, how long it has been there and whether there are other lung problems.