The definition of the Möbius function should resemble the adding and subtracting of inclusion-exclusion:
$$
\mu(n) = \begin{cases}
(-1)^k & \text{if $n$ is square-free with $k$ prime factors} \\
0 & \text{if $n$ has a square factor}
\end{cases}
$$
Here's an example of inclusion-exclusion. $\varphi(n)$ counts the positive integers up to $n$ that are coprime to $n$. The cototient $n - \varphi(n)$ counts the positive integers up to $n$ that share at least one prime factor with $n$.
To count the cototient, we count numbers using inclusion-exclusion based on how many distinct prime factors are shared with $n$:
$$n - \varphi(n) = \sum_p \frac n p - \sum_{p, p'} \frac n {p p'} + \cdots $$
Now, every divisor $d$ of $n$ is either square-free with $k$ distinct prime factors, or has a square factor. Rearranging we get
$$\varphi(n) = \sum_{d | n} \mu(d) \frac n d$$
where $\mu(d)$ encodes the sign from inclusion-exclusion, including ignoring divisors $d$ with square factors by virtue of $\mu(d) = 0$. This proves $\mu * \operatorname{Id} = \varphi$ and by Möbius inversion, $\varphi * 1 = \operatorname{Id}$.