The 2nd law of thermodynamics states that entropy of an isolated system can never decrease over time. An isolated system is defined as a system which does not exchange energy or matter with the surrounding (an example of isolated system is a closed box made of insulating material, which cannot exchange neither matter nor heat with the environment). In such a system, entropy can never decrease.
However, if the system is not isolated, its entropy can be decreased. In fact, if the system is not isolated, we can do external work and decrease its internal entropy.
Entropy from one system can only be decreased when you have a secondary system to take in the output entropy of the initial system. The law of entropy and as described on the second law of thermodynamics elaborates that entropy may decrease only by the amount it increases entropy somewhere else.