compute principal directions of a cylinder I calculated the parametric equation of a cylinder, 
$$x(u,v)=a\cos(u)$$
$$y(u,v)=a\sin(u)$$
$$z(u,v)=v$$
I do not know how to calculate principal directions ? I am not sure what it means neither

 A: The principal curvature are the eigenvalues $\kappa_1, \kappa_2$ of the shape operator denoted by $S_p$ of a surface $M$ at a point $p$ (if you don't know what the shape operator is you should look it up, it is very important). And the principal directions are the corresponding eigenvectors. From what Tomas said, they are the directions where the curvature assumes its maximum or minimum. 
Remember from linear algebra to find the eigenvalues you must solve the equation $\text{det}(\lambda I - A) = 0$ where $A$ is the matrix of the shape operator $S_p$. To find the matrix of the shape operator you must compute the First and Second Fundamental forms. Once you found your eigenvalues then finding the eigenvectors should be easy. 
So for your particular parametric equation of a cylinder we have $\sigma(u,v) = (\cos(u), \sin(u), v)$. Now computing the first fundamental form I got the following matrix $I = \pmatrix{ 1 & 0 \\ 0 & 1 \\}$ . For the second fundamental form I got $II = \pmatrix{ 0 & 0 \\ 0 & 1 \\}$. So using the equation $\text{det}(II - \kappa I) = 0$ I got the eigenvalues  $\kappa_1 = 1$ and $\kappa_2 = 0$. 
Now you can solve for your two principal directions by $v_i = \phi_i \sigma_u + \mu_i \sigma_v$ and $V_i = \pmatrix{ \phi_i \\ \mu_i  \\}$ for $i = 1,2$. Then we can find $V_i$ by $(II - \kappa I)V_i = 0$. 
If you want the details of how to find the first and second fundamental forms look at this answer by alex. 
