What does Virtually Z give you? I have a group, and it has a subgroup of finite index which is isomorphic to $\mathbb{Z}$.
My questions are these:
-Is my group a semidirect product, $\mathbb{Z} \rtimes K$, or even $\mathbb{Z} \ltimes K$, for $K$ some finite group?
-Is there anything else I have automatically?
The former isn't surprising - without loss of generality we can assume that this subgroup is normal. And so we have a short exact sequence...but does it split? I found a couple of articles recently which seem to imply this is so, but didn't reference anywhere.
The latter is also interesting - I believe I have residually finite (RF is closed under finite index), but I can't think of anything else suitable interesting...
 A: I believe that the answer to the first question is no.
Let $H$ be the direct product of the infinite cyclic group $\langle x \rangle$ and the cyclic group $\langle y \rangle$ of order 2. Then $H$ has an automorphism of order 2 with $x \mapsto x^{-1}y$ and $y \mapsto y$. Let
$G = \langle x,y,z \mid xy=yx, y^2=z^2=1, zxz = x^{-1}y, zy=yz \rangle$
be the semidirect product of $H$ with a group $\langle z \rangle$ of order 2 using this automorphism.
Let $Z$ be an infinite normal cyclic subgroup  of $G$. Then $Z$ must intersect $\langle x \rangle$ nontrivially, but the centralizer of any nontrivial subgroup of $\langle x \rangle$ is contained in $H$, and hence $Z \subset H$. So $Z = \langle x^k \rangle$ or $\langle x^ky \rangle$ for some $k \ge 1$, and then normality of $Z$ in $G$ implies that $k$ is even. But then $Z$ has no complement in $H$ so it cannot have a complement in $G$ either.
Added later: for the second question, you can say that any group $G$ that contains an infinite cyclic subgroup $Z$ of finite index has a subgroup $H$ of index at most 2, which is the direct product of an infinite cyclic group and a finite group.
To see this, assume that $Z \unlhd G$, and take $H = C_G(Z)$. Then $|H:Z(H)|$ is finite, so by a result of Schur, $H'$ is finite, and then $H/H'$ and hence also $H$ is a direct product as claimed.
A: $\newcommand{\ZZ}{\mathbb{Z}}$The following example shows that the implication "$H$ virtually $\ZZ$ implies $H$ equals $\ZZ \rtimes K$ or $K \rtimes \ZZ$." does not hold.
$\newcommand{\Aut}{\operatorname{Aut}}$$\newcommand{\Ends}{\operatorname{Ends}}$First, let $H$ be any virtually $\ZZ$ group.  Then $H$ has exactly two metric ends.  There is a homomorphism $H \to \Aut(\Ends(H)) \cong \ZZ_2$, given by the action of $H$ on itself via conjugation.  We'll use this repeatedly.
Let $\ZZ_3 = \langle u \rangle$ be the cyclic group of order three and let $\phi \in \Aut(\ZZ_3)$ be the non-trivial element. Note $\phi^2$ is equal to the identity.  Write $\ZZ = \langle t \rangle$.  Form the semidirect product $G = \ZZ_3 \rtimes_\phi \ZZ$.
Now, let $\rho$ be the nontrivial involution of $\ZZ$.  That is, $\rho(t) = t^{-1}$.  If we take $\rho$ to act trivially on $\ZZ_3$ then it is a short computation to show that $\rho$ now is an automorphism of $G$.  
So we write $\ZZ_2 = \langle w \rangle$ and we form the group $H = G \rtimes_\rho \ZZ_2 = (\ZZ_3 \rtimes \ZZ) \rtimes \ZZ_2$.  Thus $H$ is virtually $G$, and so it is virtually $\ZZ$.
Note that $w \in H$ swaps ends of $H$ while $u$ preserves the ends of $H$. 

Case 1

Note that no element of $K \rtimes \ZZ$ swaps the ends of the group.  Thus $H$ is not isomorphic to a group of the form $K \rtimes \ZZ$.

Case 2

Now suppose that $H \cong \ZZ \rtimes K$.  Since $H$ is virtually $\ZZ$, it must be that $K$ is finite.  Let $s$ be the generator of the normal 
subgroup of $\ZZ \rtimes K$.  Consider any $s^\ell k \in \ZZ \rtimes K$.  Suppose that $k$ doesn't swap ends.  Thus $ksk^{-1} = s$ and we find that $\ell \neq 0$ iff $s^\ell k$ has infinite order.  If $k$ does swap ends (ie $ksk^{-1} = s^{-1}$) then $(s^\ell k)^2 = k^2$ is finite order and $(s^\ell k)^3 = s^\ell k^3$ is the trivial element implies that $\ell = 0$. 
So let $k \in K$ be the image of $u \in \ZZ_3 < H$.  Since $u$ doesn't swap ends, neither does $k$.  Let $s^\ell h$ be the image of $t$.  By the above, $h$ doesn't swap ends.  We compute: $tut^{-1} = u^{-1}$ thus $s^\ell h k h^{-1} s^{-\ell} = hkh^{-1} = k^{-1}$.  That is, there is a finite order element of $H$ that 


*

*conjugates $u$ to its inverse and

*doesn't swap ends.


Using the normal forms for elements of $H$ we can check that this is not the case, and so have arrived at a contradiction. $\square$
I think that this is almost as bad as things can get.  If $H$ is now any group that is virtually $\ZZ$ then the kernel of the map $H \to \Aut(\Ends(H))$, ie the "end preserving subgroup", always has index at most two.  This kernel can, in turn, be written as $F \rtimes \ZZ$, where $F$ is the kernel of the map "$g$ goes to its average translation distance".  The only remaining nasty bit is that the map from $H$ to $\Aut(\Ends(H))$ doesn't have to split...
EDIT - Following Professor Holt's good example, here is a presentation of my counterexample group $H$: 
$H = \langle u, t, w \mid u^3 = w^2 = 1, \, wtw^{-1} = t^{-1}, \, tut^{-1} = u^{-1}, \, wu = uw \rangle.$
A: Is there anything else I have automatically?
Yes: if a group $G$ is virtually $\mathbf{Z}$, then it has a maximal normal subgroup (easy), say $W(G)$, and $G/W(G)$ is either isomorphic to $\mathbf{Z}$ or to the infinite dihedral group $D_\infty$.
This is a simple result of Wall proved in the 1960s.
A: If you're interested in geometric aspects, then your group is hyperbolic (https://en.wikipedia.org/wiki/Hyperbolic_group), which has various consequences. For instance, you can compute in this group using a finite-state automaton.
