Definition of the twist of varieties Suppose $k$ is a field and $K$ is a Galois extension of $k$. If $X$ is a variety defined over $k$, let $\text{Aut}(X/k)$ be the group of $k$ automorphisms of $X$, i.e. isomorphisms from $X$ to $X$ in the category of $k$-varieties,
$\require{AMScd}$
\begin{CD}
    X @>f>> X\\
    @V V V @VVV\\
    \text{Spec}\,k @>>\text{Id}> \text{Spec}\,k
\end{CD}
Then a twist of $X$ is a variety $X'$ over $k$, such that there is a $K$-isomorphism $\phi$
$\require{AMScd}$
\begin{CD}
    X' \times_{\text{Spec}\,k} \text{Spec}\,K @>\phi>> X\times_{\text{Spec}\,k} \text{Spec}\,K\\
    @V V V @VVV\\
    \text{Spec}\,K @>>\text{Id}> \text{Spec}\,K
\end{CD}
Then from literatures (e.g. Chapter X of The Arithmetic of Elliptic Curves by Silverman), there is a map associated to $\phi$ defined by
\begin{equation}
\xi: \text{Gal}(K/k) \rightarrow \text{Aut}(X/k),~\sigma \rightarrow \phi^\sigma \circ \phi^{-1}
\end{equation}
Question 1: What is $\phi^{\sigma}$? Is it given by the composition
\begin{equation}
X' \times_k K \xrightarrow{\sigma} X' \times_k K \xrightarrow{\phi} X \times_k K
\end{equation}
where the first morphism is given by $\sigma$ acting on the second factor of $X' \times_k K $?  If so, how to see $\phi^\sigma \circ \phi^{-1}$ is a $k$-automorphism of $X$?
Question 2: In Silverman's book, it says that $\xi$ measures $\phi$'s failure to be defined over $k$, could anyone explain the intuitions behind this statement? any interesting examples?
 A: The morphism $\phi^\sigma$ is defined as follow : the automorphism $\sigma$ defines an automorphism still denoted $\sigma : \operatorname{Spec}K\to\operatorname{Spec}K$. By pull-back, it defines for any $X$ an automorphism $$\sigma:X\times_k \operatorname{Spec}K\to X\times_k\operatorname{Spec}K$$
This defines a right action of $\operatorname{Gal}(K/k)$ on any $X_K=X\times_k\operatorname{Spec}K$. Now we have $\phi^\sigma=\sigma\circ\phi\circ\sigma^{-1}$. Note that this morphism is a $K$ morphism. This is because the diagram :
$$\require{AMScd}
\begin{CD}
X'\times_k\operatorname{Spec}K@>\sigma^{-1}>>X'\times_k\operatorname{Spec}K@>\phi>>X\times_k\operatorname{Spec}K@>\sigma>>X\times_k\operatorname{Spec}K\\
@VVV@VVV@VVV@VVV\\
\operatorname{Spec}K@>\sigma^{-1}>>\operatorname{Spec}K@=\operatorname{Spec}K@>\sigma>>\operatorname{Spec}K
\end{CD}$$
commutes and that the bottom row is obviously the identity.
(Note : if $G$ acts on objects $A$ and $B$ (on the right), the formula $\phi^\sigma=\sigma\circ\phi\circ\sigma^{-1}$ is the usual (right) action on $Hom(A,B)$. Note also that if $X=\operatorname{Spec}k[x_1,...,x_n]/(I), X'=\operatorname{Spec}k[y_1,...,y_m]/(J)$ and $\phi:X'_K\to X_K$ is given by $x_i\mapsto P_i(y_1,...,y_m)$, then $\phi^\sigma$ is given by $x_i\mapsto \sigma P_i(y_1,...,y_m)$ as Lubin said.)
However, it seems that this is an error in Silverman's book or an abuse of notation : $\xi_\sigma:=\phi^\sigma\circ\phi^{-1}$ is definitively not a automorphism of $C/k$, only of $C_K/K$. In fact this morphism is not invariant by Galois and we even have the cocycle equality : $\xi_{\sigma\tau}=(\xi_\sigma)^\tau\xi_\tau$.

As for question 2), $\phi$ is defined over $k$ iff it is invariant by Galois (this is obvious with the local description), in other words iff $\phi^\sigma=\phi$ for every $\sigma$, this is in turn equivalent to the cocycle $(\xi_\sigma)$ being trivial.
Have you look at the examples in Silverman's book ?
