In parliamentary systems of government, Ministry refers to a Cabinet Level division of Government who's head will be an elected minister who will be responsible for that department before legislative body and the head of government. Normally, they are either a Member of the PM/Chancellor's party or a party within their coalition.
In presidential systems of government, the Head of Government is not part of the legislature and thus will appoint Cabinet Members to various departments (In the U.S., these are normally denoted by the title "Secretary" although not always. The Attorney General is the Cabinet level official for the Department of Justice, while the Secretary of the Army is not a Cabinet Level position, but falls under Secretary of Defense.
A nation being Federal or Unitary does not really have a bearing on departmartments other than in Federal systems, the member states might have their own cabinets, ministries, and departments that cover similar government areas as their Federal Counter Parts. For example in the United States, every state has a "Department of Education" as does the Federal Government. But the Federal Department is usually more concerned with managing federal grants and student loans (almost always for higher education) while the State level counter parts are the administrative body for all public primary education and state run secondary education in the state (and may have some regulatory control on private primary education, by way of determining what graduation requirements those schools need to meet for their diplomas to matter). This is because in Federal nations, typically the Federal Government has restrictions on what laws it can make, and the member states are able to make laws that are more locally tailored to suit that regions various concerns. Nevada (a state that is mostly open desert), Washington (A state that is very very wet), and Hawai'i (a state which isn't a single contiguous land mass), could all have different restrictions on water consumption and usage during summer tourism seasons (Nevada would like you to use as little as possible so the Casinos can toss it around in fountains on the Vegas strip, Hawai'i will have to decide if they want to use surf boards, jet skis, or boats in their latest tourism advert, and Washington will question if they can pay people to take some of the rain water back to their home state when they leave.).