Literally it means to build a physical wall out of wood with a hammer and nail. Metaphorically, it could mean he is putting an imaginary wall between him and something or some one. Thus removing them from his sight and mind. This Metaphor may be used when you are upset with something and want to get it out of your mind so you put a wall between you and whatever or whomever is upsetting you. Example if a girl broke his heart he would put up a wall between him and her so he can get her out of his thoughts. Make sense?