The main points are:
We are studying a Canonical Transformation (CT) $$(q,p) \longrightarrow (Q,P) $$ from old canonical coordinates $(q,p)$ and Hamiltonian $H(q,p,t)$ to new canonical coordinates $(Q,P)$and Kamiltonian $K(Q,P,t)$.
$S_1(q,Q,t)$ is a so-called type 1 generating function of the CT.
$S_2(q,P,t)$ is a so-called type 2 generating function of the CT.
For all four types of generating functions hold that $$K-H~=~\frac{\partial S_i}{\partial t},\qquad i~=~1,2,3,4. $$
The two types of generating function are connected via a Legendre transformation $$S_2(q,P,t)-S_1(q,Q,t)~=~Q^i P_i. $$
For all four types of generating functions hold that $$K-H~=~\frac{\partial S_i}{\partial t},\qquad i~=~1,2,3,4. $$
Goldstein, Classical Mechanics, uses $S_2(q,P,t)$ in the treatment of Hamilton-Jacobi equation. Goldstein assumes that the Kamiltonian $K=0$ vanishes identically.
Arnold, Mathematical Methods of Classical Mechanics, uses $S_1(q,Q,t)$ in Section 47 and $S_2(q,P,t)$ in Section 48. Arnold assumes (among other things) that $S_1(q,Q,t)$ does not depend explicitly on $t$.