Ethics:
One way to answer the question would be to point out the distinctive way that it treats the notion of rightness, right action, in Ethics, can be understood only with the aid of an account of the virtues, which in turn can be understood independent of right action, In ethics can be understood only with the aid of an account of the Ethics. There is enormous diversity among ethics as to how the relation between rightness and ethics be made more precise.
Legal:
Legal systems are clearly a part of political, social and economic development, just as are educated systems and other areas of culture. No major social change occurs or is put into effect in a social which is not reflected in some kind of change in its law. Legal institutions are responsible to social change, moreover, they have a definite role, rather poorly understood, as instrumental that set off, monitor, or otherwise regulate the fact or pace of social change.
An example of an action that is legal, but not ethical:
The best example of ethical but illegal I can think of would be actions such as those by Rosa Parks, Martin Luther King, Jr and others who engage in acts of civil disobedience against unjust laws. For example, refusing to sit at the back of a bus or being refused service at a white only counter.
Unethical but not illegal. Firing an employee without notice for no good reason. Lying to your boss to get a day off from work.
Duncan, George T. "Is my research ethical?." Communications of the ACM39.12 (1996): 67-68.