In legal context, the terms duties and obligations are often used interchangeably. The definition is the same, indeed, both means that one has to do (or not do) something. However, there are some distinctions in the usage of the two terms.
It can refer to something that is expected or required by the law or morals, or by a person’s position or occupation. Within the category of legal duties, for example, distinciton is made between the duty of care and duty of performance. This is related to the categroization of various contract types in the civil law world. There is a concept called "negative duty", which, in the law, means forebearance, that is the obligation not to perform something that one may otherwise do.
In employment, duties (and responsibilities) relate to the list of activities that an employee is required to perform in the course of employment. Those duties are often listed in a document called job description.
In the law, obligation is used in a much narrower sence. Obligation is something by which the contracting parties are bound to do under the terms of the contract.
In conclusion, we may say that the word ‘duty’ is used in a more general sense. Duty is used for various types of activities that one must perform, inlcuding legal and moral, as well as those duties related to employment.
Obligations is reserved mainly for something that one has to perform under a contract or as a result of some other legal relations.