墙 means wall,like the wall of the house,the wall of the city(城墙cheng qiang)。
垣 means wall too,It is common in the Classical Chinese as an archaic word,barely used in daily life,expect an chinese Idiom,断壁残垣(duan bi can yuan),means ruins。
壁 generally refers to the walls(墙壁), it can also mean an upright cliff (崖壁)。I think 壁 more represents a vertical surface。When you use 壁,you need to mention the 壁 of what or what of the 壁,like 崖壁(cilff)or 壁虎(the tiger of the 壁——gecko)。
There is not much differences between 墙 and 墙壁,nearly interchangeable at any time。Only in some contexts,墙壁 more focus on the vertical surface of the wall,and 墙 is simpler, more common, more colloquial than 墙壁 。
—————————————————————————————————————————————————————————————————————