How works exactly the option disable App notifications Some Apps like Facebook also when aren't used slow down the device because of their associated autostart tasks.
In android settings in Apps section there is the option to enable or disable the notification. 

This works only on notification or disable also the associated task completely? 

How works exactly?
It only hides the notification when the app creates it. It doesn't affect what the app might do in the background or stop the app spending battery and data to create it in the first place.