The primary function of the judiciary is to interpret laws. The judiciary examines the meaning, scope, and application of legislation passed by the legislature and determines how those laws apply to specific cases. This includes deciding disputes between individuals, between individuals and the state, and between different levels or arms of government.
Maintaining law and order is primarily the function of the executive arm (through agencies like the police). Making laws is the function of the legislature (the National Assembly in Nigeria). Enforcing laws is also an executive responsibility. While judicial decisions help shape law through precedent and judicial review, the defining and primary role of the judiciary is interpretation rather than creation or enforcement of law.
In Nigeria, the judiciary, headed by the Supreme Court, acts as the guardian of the constitution by interpreting its provisions and ensuring that the actions of the other arms of government conform to constitutional requirements.