Definition of dipole moment $$\vec{\mu}=q\times\vec{r}$$
where $q$ is the charge of the two atoms involved, $\vec{r}$ the distance between them.
- It is a vector parallel to $\vec{r}$.
- It origins in a separation of two equal in magnitud and opposite
charges,
- Usually: bigger electronegativity difference ($\chi$) between atoms implies bigger charge ($q$) and so bigger $\mu$. Source.
But both $q$ and $r$ determine the $\mu$-value.
When there are many atoms, and many bonds ($b$) net dipole is obtained by summing up:
$$\mu_{net}=\sum_b\vec{\mu_b}=\sum_b\,q_b\times\vec{r_b}$$
Importantly, to sum up vectors we use bond angles between them. In consequence, molecular geometry is needed.
Molecule geometry
Lewis structures and $\texttt{VSEPR}$ are necessary to predict molecular geometries, and molecular geometry will indicate the angles between dipoles.
One could summarize the previous lines as: $\texttt{VSEPR}$ $\rightarrow$ molecular geometry $\rightarrow$ net dipole moment.
Let's write two examples:

We can see dipoles are on the same line ($x$), and opposite direction. The sum is zero: $\vec{\mu}_{net}=\mu_x - \mu_x = 0$.

In the $\ce{H2O}$ example, there is a net dipole. If angles are measured from $x$ axis, which bisects the bond angle, and contributions are added it yields:
$\vec{\mu}_{net}=2\,q\, r\times cos(52.25)\vec{i}$
Only components on $x$ axis survive. For a detailed explanation see this video.
Next step could be $\ce{SO2}$, which has a net dipole smaller than water. Same analysis gives zero dipole moment for $\ce{BF3}$.
Applications
See this post for simple applications of this knowledge in reality.
*Molecules were drawn with chemfig
package.