Superposition only applies when you have a purely linear system, i.e.:
\begin{align*}
F(x_1 + x_2) &= F(x_1) + F(x_2)\\
F(a x) &= a F(x)
\end{align*}
In the context of circuit analysis, the circuit must be composed of linear elements (capacitors, inductors, linear transformers, and resistors) with N independent sources, and what you're solving for must be either voltages or currents. Note that you can take a super-imposed solution to voltage/current to find other quantities which are not linear (ex. power dissipated in a resistor), but you cannot superimpose (add) non-linear quantities to find the solution for a larger system.
For example, let's take a single resistor and look at Ohm's law (I'm using U and J for voltage/current respectively, no particular reason) and see how current contributed from source \$i\$ affects the voltage:
\begin{align*}
U = J R = R \left(\sum_{i=1}^N J_i\right) = \sum_{i=1}^N R J_i = \sum_{i=1}^N U_i
\end{align*}
So I can find the voltage across a resistor by summing up the current contribution from every source independent of any other source. Similarly, to find the current flowing through the resistor:
\begin{align*}
J = \frac{U}{R} = \frac{1}{R} \sum_{i=1}^N U_i = \sum_{i=1}^N \frac{U_i}{R} = \sum_{i=1}^N J_i
\end{align*}
However, if I start looking at power, superposition no longer applies:
\begin{align*}
P = J U = \left(\sum_{i=1}^N J_i\right) \left(\sum_{j=1}^N U_j\right) \neq \sum_{i=1}^N J_i U_i = \sum_{i=1}^N P_i
\end{align*}
The general process for solving a circuit using superposition is:
- For each source \$i\$, replace all other sources with their equivalent null source, i.e. voltage sources become 0V (short circuits) and current sources become 0A (open circuits). Find the solution \$F_i\$, for whatever unknowns you are interested in.
- The final solution is the sum of all solutions \$F_i\$.
Example 1
Take this circuit with two sources:

simulate this circuit – Schematic created using CircuitLab
I want to solve for the current J flowing through R1.
Pick V1 as source 1, and I1 as source 2.
Solving for \$J_1\$, the circuit becomes:

simulate this circuit
So we know that \$J_1 = 0\$.
Now solving for \$J_2\$, the circuit becomes:

simulate this circuit
So we can find that \$J_2 = I_1\$.
Applying superposition,
\begin{align*}
J = J_1 + J_2 = 0 + I_1 = I_1
\end{align*}
Example 2

simulate this circuit
Now I am interested in the current through R4 \$J\$. Following the general process outlined earlier, if I denote V1 as source 1, V2 as source 2, and I1 as source 3, I can find:
\begin{align*}
J_1 &= -\frac{V_1}{R_1 + R_2 + R_5 + R_4}\\
J_2 &= \frac{V_2}{R_2 + R_1 + R_4 + R_5}\\
J_3 &= -I_1 \frac{R_2 + R_5}{R_1 + R_4 + R_2 + R_5}
\end{align*}
Thus the final solution is:
\begin{align*}
J &= J_1 + J_2 + J_3 = \frac{V_2 - V_1}{R_1 + R_2 + R_4 + R_5} - I_1 \frac{R_2 + R_5}{R_1 + R_2 + R_4 + R_5} =
\frac{(V_2 - V_1) - I_1 (R_2 + R_5)}{R_1 + R_2 + R_4 + R_5}
\end{align*}
The power of superposition comes from asking the question "what if I want to add/remove a source?" Say, I want to add a current source I2:

simulate this circuit
Instead of starting over from the beginning, the only thing I need to do now is find the solution for my new source I2 and add it to my old solution:
\begin{align*}
J_4 &= I_2 \frac{R_1 + R_2 + R_5}{R_1 + R_2 + R_5 + R_4}\\
J &= \sum_{i=1}^4 J_i =
\frac{(V_2 - V_1) - I_1 (R_2 + R_5) + I_2 (R_1 + R_2 + R_5)}{R_1 + R_2 + R_4 + R_5}
\end{align*}