We describe how the strings, which are classical solutions of the continuum three-dimensional U(1)+Higgs theory, can be studied on the lattice. The effect of an external magnetic field is also discussed and the first results on the string free energy are presented. It is shown that the string free energy can be used as an order parameter when the scalar self-coupling is large and the transition is continuous.