What is the relationship between "automatic flight control system AFCS", "autopilot", "flight director" and "flight management system FMS"?
Since you are studying maintenance, I would suggest you obtain a copy of ATA iSpec 2200, Information Standards for Aviation Maintenance ATA Standard Numbering System.  Most large aircraft manufacturers and airlines use the ATA Standard Numbering System in organizing their maintenance documentation.  

To your specific question, the ATA spec lists the following:

The FMS is the primary tool for managing the navigation.  It is part of the larger Navigation system which includes the aircraft attitude, air data, and positioning sensors. The FMS supports flight planning (path definition) and integrated position determination.


  Chapter 34 NAVIGATION, section 60 Flight Management Computing.  
  
  That portion of the system which combines navigational data to compute
  or manage the aircraft's geographical position or theoretical flight
  path. Includes items such as course computers, flight management
  computers, performance data computers, and associated control display
  units, warning annunciators, etc.


The FM function outputs a desired path and guidance data to the displays and AFCS. The FMS is one source of path and target (altitude and or speed) data for the AFCS. The other input source is by crew input via the Mode Control Panel (MCP).  

The AFCS is functionally independent from the FMS and primary flight control system (FCS), though it is sometimes physically integrated with one or the other or both.  

The AFCS has two major components, autopilot and auto throttle. Autopilot includes the Flight Director.    


  Chapter 22 AUTO FLIGHT, section 10 Autopilot  
  
  That portion of the system that uses radio/radar signals, directional
  and vertical references, air data pitotstatic, computed flight path
  data, or manually induced inputs to the system to automatically
  control the flight path of the aircraft through adjustment to the
  pitch/roll/yaw axis or wing lift characteristics and provide visual
  cues for flight path guidance, i.e.: Integrated Flight Director. This
  includes power source devices, interlocking devices and amplifying,
  computing, integrating, controlling, actuating, indicating and warning
  devices such as computers, servos, control panels, indicators, warning
  lights, etc.


and  


  Chapter 22 AUTO FLIGHT, section 30 Auto Throttle  
  
  That portion of the system that automatically controls the position of
  the throttles to properly manage engine power during all phases of
  flight/attitude. This includes engaging, sensing, computing,
  amplifying, controlling, actuating and warning devices such as
  amplifiers, computers, servos, limit switches, clutches, gear boxes,
  warning lights, etc.


The AFSC computes the necessary control inputs to fly the aircraft along the defined path and meet targets.  It provides control inputs into the flight controls (ATA Chapter 27) or in the case of the Flight Director, it generates a display that directs the pilot to make the needed control inputs.  

This steering will steer the aircraft to the path defined by the FMC, or it can steer to a simple path entered by the pilot directly into the AFCS via the MCP.  In older aircraft, the autopilot steers by using a series of special actuators to manipulate the controls. In modern fly-by-wire aircraft, it provides input directly to the FCS as the FCS already has the necessary actuators.  

Auto Throttle provides throttle adjustments to meet speed targets from the FMC or MCP.  

By the ATA standard, the FMS, AFCS, and FCS are three distinct systems. As noted above, modern fly-by-wire systems are beginning to blur the boundaries.  Without the need for separate actuators for the AFCS, it just becomes software much of which is getting merged with the primary FCS.