Centralizer not trivial. Let $G$ group and $H$ subgroup of $G$. Let $C_G(H)=\left\{g\in G:gh=hg \text{ for all }h\in H\right\}$.
Give an example of a group $G$ and a subgroup $H$ of $G$ for which $H\cap C_G(H)=\left\{1\right\}$ and
$C_G(H)\neq \left\{1\right\}$.
I have this: Let $G=\mathbb{Z}_2$ and $H=\left\{0\right\}$. Then $H\cap G=\left\{0\right\}$ and $C_G(H)=\left\{0,1\right\}$ because $0+0=0+0$ and $1+0=0+1$. 
This is correct? I ask this since I imagine that the statement refers to element 1 as the identity of the group ...
 A: Your solution is correct, but in a sense it is “trivial”. 
An observation to make is that $C_G(H)\cap H = Z(H)$. Indeed, any element of $Z(H)$ both lies in $H$ and commutes with every element of $H$, giving $Z(H)\subseteq C_G(H)\cap H$. Conversely. if $x\in C_G(H)\cap H$, then $x\in H$ and commutes with every element of $H$, hence lies in $Z(H)$.
So the question is asking for an example where the center of $H$ is trivial, but but centralizer of $H$ in $G$ is not trivial. Your example works, because $H$ itself is trivial and hence its center is trivial; but $G$ is not trivial.
Another example would be to take a group that has trivial center, such as $S_3$, and stick it inside a group where it commutes with something. For exmaple, $G=S_3\times\mathbb{Z}_2$ and letting $H=S_3\times\{0\}$; or to let $G=S_5$ and let $H$ be the copy of $S_3$ that lies inside of $G$ as the elements that send $4$ and $5$ to themselves. Then $(4,5)$ centralizes $H$, but $H$ is centerless so $C_G(H)\neq\{e\}$ and $C_G(H)\cap H=\{e\}$. 
A: Yes, this is correct. It's common to call the identity of a general group $1$ and the identity of an abelian group $0$ (and the operation of an abelian group is usually denoted $+$ when we use $0$ as its identity). In your example, the identity of $\mathbb{Z}_2$ is $0$, and $1$ is just its other element.
