Force on a moving charge in a magnetic field is q(→v×→B).
Thus if the particle is moving along the magnetic field, →F=0.
Hence the particle continues to move along the incident direction, in a straight line.
When the particle is moving perpendicular to the direction of magnetic field, the force is perpendicular to both direction of velocity and the magnetic field.
Then the force tends to move the charged particle in a plane perpendicular to the direction of magnetic field, in a circle.
If the direction of velocity has both parallel and perpendicular components to the direction magnetic field, the perpendicular component tends to move it in a circle and parallel component tends to move it along the direction of magnetic field. Hence the trajectory is a helix.