Shortly, yes. Formally, for every DFA $\mathcal{A} = \langle \Sigma, Q, q_0, \delta, F\rangle$, define the DFA $\overline{\mathcal{A}} = \langle \Sigma, Q, q_0, \delta, F' \rangle$, where $F' = Q\setminus F$. That is, $\overline{\mathcal{A}}$ is obtained by flipping the acceptance of the states in $\mathcal{A}$. We calim the following.
Claim: $\overline{L(\mathcal{A})} = L\left(\overline{\mathcal{A}}\right)$.
Proof: for every word $w\in \Sigma^*$, we have $$ w\in L(\mathcal{A}) \leftrightarrow\\ \text{the run $r_0, r_1, \ldots, r_{|w|}$ of $\mathcal{A}$ on $w$ is such that $r_{|w|}\in F$}\leftrightarrow \\ \text{the run $r_0, r_1, \ldots, r_{|w|}$ of $\overline{\mathcal{A}}$ on $w$ is such that $r_{|w|}\in F$}\leftrightarrow \\ \text{the run $r_0, r_1, \ldots, r_{|w|}$ of $\overline{\mathcal{A}}$ on $w$ is such that $r_{|w|} \notin Q\setminus F$} \leftrightarrow \\ \text{the run $r_0, r_1, \ldots, r_{|w|}$ of $\overline{\mathcal{A}}$ on $w$ is such that $r_{|w|} \notin F'$} \leftrightarrow \\ w\notin L\left( \overline{\mathcal{A}}\right)$$
Crucial points in the construction that you should ponder about:
Both automata have the same structure, in particular, they have the same run over the same word $w$: can you tell where we relied on this fact?
The automaton $\mathcal{A}$ is deterministic (in particular, there is a single run of $\mathcal{A}$ on $w$ that determines whether $w$ is accepted or rejected): if $\mathcal{A}$ is nondeterministic, then the construction does not work. Indeed, on input word $w$, there could be two runs of $\mathcal{A}$ on $w$: $r$ which is accepting, and $p$ which is rejecting. After flipping the acceptance of states, we get that $r$ is rejecting and $p$ is accepting, and so $w$ is still accepted.