Method 1 (the top-down method). Consider the collection of all topologies on X that contain S. This collection is nonempty (because it contains the discrete topology P(X)). It is easy to check that any intersection of topologies on X is again a topology. So define the minimal topology on S as the intersection of all topologies on X that contain S.
Method 2 (the bottom-up method). Let T'(S) be the set of all finite intersections of elements of S (together with the empty set, if necessary), and let T"(S) be the set of all unions of elements of T'(S) (together with X, if necessary). Then check that T"(S) is a topology. It's fairly obvious that it must be the smallest topology containing S.