There is an article in this link. I need your help to understand part 4. I don't know how it derived to:
$$F_x(d)=\frac{1}{d}\sum_{u,v\in S}\sum_{o(\chi )\mid d}\chi (u+v)$$
and $F_x(d)=\frac{x^2}{4d}+O(xp^{1/2})$
Also I don't know what is Brun's method.
Since I get the impression that you are relatively new to the subject of number theory, I'll give the answer in a bit of long-winded detail.
PART 1 - Group characters and detecting $d$th powers
First we introduce characters of finite abelian groups. Let $G$ be a finite abelian group with identity $1$, and let $$\chi: G \rightarrow \mathbb{C}^\times$$ be a group homomorphism from $G$ to the multiplicative group of the complex numbers. We call $\chi$ a character of the group. For example, the character $$\chi_{\text{trivial}}(g) = 1$$ that sends every element of the group to 1 is called the trivial character, which I denote $\chi_{\text{trivial}}$. The group characters themselves form a group under multplication, denoted $\widehat{G}$, where $\chi_{\text{trivial}}$ serves as the identity element. Note that the size of $G$ and $\widehat{G}$ are equal, and they are isomorphic to each other (but not canonically so).
The group characters have an important property called orthogonality, which comes in two flavors. One flavor sums over the group elements: $$\frac{1}{|G|}\sum_{g \in G} \chi(g) = \begin{cases} 1 & \text{if } \chi = \chi_{\text{trivial}}\\ 0 & \text{if } \chi \neq \chi_{\text{trivial}}\\ \end{cases}$$ The other flavor sums over the group characters: $$\frac{1}{|G|}\sum_{\chi \in \widehat{G}} \chi(g) = \begin{cases} 1 & \text{if } g = 1\\ 0 & \text{if } g \neq 1\\ \end{cases}$$ In other words, the second identity uses group characters to detect the identity element of $G$. This is quite useful because "if...then" statements are hard to do analysis on, so it is useful to convert them to sums of characters.
We can modify these sums to detect other kinds of elements as well. For example, consider elements in $G$ that are squares, i.e. elements of the set $$H = \{g^2 \,:\, g \in G\}.$$ So to detect squares, we want to form a new group for which all the squares serve as the identity element of the group; this is precisely what the quotient group $G/H$ is. Therefore we have $$\frac{1}{|G/H|}\sum_{\chi \in \widehat{G/H}} \chi(gH) = \begin{cases} 1 & \text{if } g \in H, \text{ i.e. } g \text{ is a square in } G\\ 0 & \text{if } g \notin H\\ \end{cases}$$
But what exactly are the characters in $\widehat{G/H}$? By definition, they are group homomorphisms $$G/H \rightarrow \mathbb{C}^\times$$ which correspond bijectively to homomophisms $G \rightarrow \mathbb{C}^\times$ which are trivial on $H$. Therefore we have
$$\frac{1}{|G/H|}\sum_{\substack{\chi \in \widehat{G}\\ \chi \text{ trivial on } H}} \chi(g) = \begin{cases} 1 & \text{if } g \text{ is a square in } G\\ 0 & \text{otherwise}\\ \end{cases}$$ How might we characterize characters $\chi$ that are trivial on $H$ in terms of the order of $\chi$ in the group $\widehat{G}$? A character $\chi$ is trivial on $H$, i.e. trivial on squares if $$\chi(g^2) = 1$$ for all $g$ in $G$. But since $\chi(g^2) = \chi(g)^2$, this is equivalent to saying $$\chi(g)^2 = 1$$ for all $g$ in $G$, i.e. $\chi^2 = \chi_\text{trivial}$, i.e. $\chi$ has order dividing 2 in the character group $\widehat{G}$. Therefore we can rewrite our square-detecting sum as $$\frac{1}{|G/H|}\sum_{o(\chi) | 2} \chi(g) = \begin{cases} 1 & \text{if } g \text{ is a square in } G\\ 0 & \text{otherwise}\\ \end{cases}$$ where we are summing over all characters $\chi$ whose order $o(\chi)$ divides 2.
All of the foregoing can be generalized from detecting squares to detecting $d$th powers by letting $H$ be subgroup of $d$th powers: $$\frac{1}{|G/H|}\sum_{o(\chi) | d} \chi(g) = \begin{cases} 1 & \text{if } g \text{ is a } d\text{th power in } G\\ 0 & \text{otherwise}\\ \end{cases}$$
For number theoretic applications, we can specialize our finite abelian group $G$ the multiplicative group of integers modulo prime $p$, i.e. $$G = (\mathbb{Z}/p\mathbb{Z})^\times,$$ which is a cyclic group. Note that since character group is cyclic, we have $|G/H|=d$. The group of characters $\widehat{G}$ are precisely the Dirichlet characters, so now we have a $d$th power residue modulo $p$ detector: $$\frac{1}{d}\sum_{o(\chi) | d} \chi(u) = \begin{cases} 1 & \text{if } u \text{ is a } d\text{th power residue modulo } p\\ 0 & \text{otherwise}\\ \end{cases}$$ where the sum is over all Dirichlet characters modulo $p$ of order dividing $d$.
For example, in your paper you have the set $S = \{1, 2, \dots, \lfloor x/2 \rfloor\}$ and want to estimate the size of $$F_x(d) = \#\{u+v \,:\, u, v \in S,\, u+v \text{ is a } d\text{th power residue modulo } p\}$$
It is now easy write an equation that counts $d$th powers: $$F_x(d) = \frac{1}{d} \sum_{u, v \in S} \sum_{o(\chi)|d} \chi(u+v).$$
PART 2 - Elementary estimations and big-O notation
We can split the above sum into two parts $$F_x(d) = \frac{\lfloor x/2 \rfloor^2}{d} + \frac{1}{d} \sum_{u, v \in S} \sum_{\substack{o(\chi)|d\\o(\chi)>1}} \chi(u+v).$$
Since our characters are modulo prime $p$, our character group is cyclic, so the number of characters of order $d$ is $\phi(d)$, where $\phi$ is the Euler totient function, and the number of characters of order dividing $d$ is $$\sum_{e|d} \phi(e) = d.$$ Since we are excluding the character of order 1 (the trivial character), our inner sum is over $d-1$ characters.
The lemma in the paper states that for $\chi$ a nontrivial character modulo $p$, $$\left| \sum_{\substack{u \in S\\v \in T}} \chi(u+v) \right| \leq p^{1/2} \sqrt{|S||T|}.$$
Therefore, $$\left| F_x(d) - \frac{\lfloor x/2 \rfloor^2}{d} \right| \leq \frac{d-1}{d} p^{1/2}\left\lfloor \frac{x}{2} \right\rfloor < p^{1/2} \frac{x}{2}.$$ Since $(x/2)^2 - \lfloor x/2 \rfloor^2 \leq x$, we have $$\left| F_x(d) - \frac{x^2}{4d} \right| < p^{1/2} \frac{x}{2} + \frac{x}{d} < \frac{3}{2} xp^{1/2}.$$ In big-O notation, $$F_x(d )= \frac{x^2}{4d} + O\left(xp^{1/2}\right).$$