A newly emerging category of medical study is the potential to replace a missing piece, in part or in its entirety. While currently in its infancy, the potential for this in human health is astounding.
For example, this article from MIT, Brigham and Women’s Hospital (BWH), and Massachusetts Eye and Ear discusses a method for regrowing human ear hair cells, responsible for hearing, which is set to commence human trials in as little as a year. This article from University of Washington discusses research into regrowing partial primate hearts to obviate heart transplantation in humans. Research from the Free University of Brussels suggests the same is possible for human lungs.
Simplifying for the purpose of the question and disregarding those components that fall outside of voluntary control, if a deaf person were given new functioning cochlear hair cells, or an amputee were given a regrown arm, could the brain be taught to recognize and use the new piece, specifically in (1) cases of congenital loss and (2) cases of acquired loss, respectively, and how?