A cylinder parallel to an axis just means that the value does not depend on the coordinate along that axis.

For example, the first cylinder is parallel to the y axis, so you don't need to consider y in the equation. All you need is to write the equation of the circle in the xz plane (this automatically becomes a cylinder in 3 dimensions - think about it).

So the equation of the circle for the first one is:

(x-a)^2 + (z - a)^2 = a^2

Do you understand now?