Countries are legally bound by any rulings passed down by the United Nations (as long as they are members). However, they are not truly obliged to obey unless the UN or some of its members can force them to obey.
The UN cannot force its members to live up to their agreements. There are many examples of countries refusing to do what the UN calls for in resolutions. They are legally supposed to obey, but they will not obey unless they are forced to do so. This is one of the major weaknesses of the UN.