What is causing this behavior?
The tick sound is caused by a discontinuity in the derivative of your signal, producing a noisy sound at this very moment.
How could (and should) I remove it?
To keep your sound clean when changing frequency, you should avoid the discontinuity in the derivative of the sine wave before the change and the sine wave after the change. The only easy solution is to take advantage of the zero derivate on every local extrema of a sine wave.
So, when a new note is played, your synthesizer algorithm should save its frequency but not apply it straightaway. It should rather wait for the next maximum/minimum of amplitude to switch frequency.
By the way, if you add a velocity feature to your synthesizer, the amplitude change will have to be done when the sine wave is crossing zero.
Update:
By velocity, I mean the intensity of the note. In musical terms we would say piano, pianissimo, forte, fortissimo... In your case you just have to change the amplitude of the sine wave.