Definition of Semantic Entailment in First-order Theory I cannot understand the meaning of the soundness theory in first order logic.
It says that if $S$ syntactically entails $p$, then $S$ semantically entails $p$.
However, $p$ don't have to be a sentence, which means that we should define the meaning of $S$ semantically entails $p$ where $FV(p)$ is not empty.
What is the definition?
 A: There are two basic approaches in order to "give meaning" to open formulas.
According to the first one, the meaning (and the truth-value) of an open formula with respect to an interpretation $\mathfrak A$ is defined for specific "instances" of the formula.
In this case, we do not consider $p(x)$ but the corresponding instance obtained replacing the variable $x$ with a "name" or considering a variable assignment function $s$ that assign an object $a$ of the domain of $\mathfrak A$ to $x$.
In this case, the satisfaction relation holds for "instances":

$\mathfrak A \vDash \varphi [s]$.

See: Herbert Enderton, A Mathematical Introduction to Logic, Academic Press (2nd ed. 2001), page 83.
The relation of semantic consequence (or entailment) is defined accordingly [see page 88] :

Let $\Gamma$ be a set of wffs, $\varphi$ a wff. Then $\Gamma$ logically implies $\varphi$, written $\Gamma \vDash \varphi$, iff for every structure $\mathfrak A$ for the language and every function $s : \text {Var} \to | \mathfrak A |$ such that $\mathfrak A$ satisfies every member of $\Gamma$ with $s$, $\mathfrak A$ also satisfies $\varphi$ with $s$.


The second case, limits the definition of meaning and truth value to sentences, i.e. "closed" formulas.
For open one, it adopts the convention that:

$\mathfrak A \vDash \varphi \text {  iff  } \mathfrak A \vDash \text {Cl}(\varphi)$,

where $\text {Cl}(\varphi)$ is the universal closure of $\varphi$. 
See: Dirk van Dalen, Logic and Structure, Springer (5th ed. 2013), page 67.
In this case :

$Γ \vDash \varphi \text {  iff   (  if  } \mathfrak A \vDash \Gamma,  \text {  then  } \mathfrak A \vDash \varphi )$, where $Γ \cup \{ \varphi \}$  consists of sentences.

A: By definition, $S \vDash p$ iff all combinations of structures and assignment functions that make all formulas of $S$ true also make $p$ true. The definition does not distinguish between open formulas and sentences, and it doesn't need to.
If $p$ contains free variables, then $S \vDash p$ simply implies that $p$ has to be true under all the interpretations (= structures and variable assignments) that also make all of $S$ true.
If $S$ contains free variables as well, then $p$ has to be true under the same variable interpretations (and structures) that make all formulas of $S$ with the respective free variables true.
If $S$ only contains sentences, its truth value is independent of specific assignment functions and only depends on the structure, so for each structure, either all or no assignments make $S$ true, and consequentially, unless $S$ is a contradiction (which semantically entails anything no matter the validity of the formula $p$), $p$ has to be true under all assignment functions in the respective structure. And stating that a formula $p$ with free variables $x_1, \ldots x_n$ is true under all assignment functions amounts to stating that the universal quantificaton of $p$ is valid: $\forall x_1 \ldots x_n p$.
