The legislative acts of the European Union (EU) can have different forms: regulations, directives, decisions, recommendations and opinions.
A directive fixes the objectives to be pursued by the EU member states, but leaves freedom of choice for the ways of obtaining them (maintaining an obligation to achieve the result): "A directive shall be binding, as to the result to be achieved, upon each Member State to which it is addressed, but shall leave to the national authorities the choice of form and methods." (art. 249 ex.189).
In practice, with the exception of directives related to the common agricultural policy, the Union 'addresses' directives to all member states, and specifies a date by which the states must have put the directive into effect. Individual states frequently miss these deadlines, and when the deadlines slip badly, the European Commission can and does commence proceedings in the European Court of Justice against the countries involved.
Through its case law, the European Court of Justice has provided guidelines for member state judges on how to deal with cases where directives have not been transposed into national law, or have been transposed incorrectly.
AEL wiki on the codecision procedure - it rules on how most directives are negotiatedExternal link