FXS is an interface which drives a telephone. FXS interfaces get phones plugged into them, deliver battery, and provide ringing. The FXS interface initiates and sends a ringing voltage to the FXO interface.
FXO is an interface that connect to a phone line. They supply your PBX with access to the public telephone network. FXS interfaces are what allow you to hook telephones to your PBX, and FXO interfaces allow you to connect your PBX to real analog phone lines. FXO interfaces receives the ringing voltage from the FXS interface.
The phone receiving the call is the last FXO device in the chain, and when it receives voltage from an FXS device, the phone will ring.
To receive voltage from outside lines, connect the outside line to an FXO port on your Asterisk server. Then connect the phones to FXS ports on your Asterisk server. When the FXO module in your Asterisk Server receives the voltage, it will then generate voltage using the FXS module and send it to your analog phone.