# How does SVM prediction work?

As far as I understand, the training phase usually uses the dual optimization formulation where we can implicitly calculate the weight vector which defines the discriminant function.

How about the prediction phase, how do we use these weights and the kernel function when a new test sample arrives?

edit: I should clarify, I am interested in the nonlinear SVM.