Anisotropic particles suspended in a nematic liquid crystal disturb the alignment of the liquid crystal molecules and experience small forces that depend on the particles' orientation. We have measured these forces using magnetic nanowires. The torque on a wire and its orientation-dependent repulsion from a flat surface are quantitatively consistent with theoretical predictions based on the elastic properties of the liquid crystal. These forces can also be used to manipulate submicrometer-scale particles. We show that controlled spatial variations in the liquid crystal's alignment convert the torque on a wire to a translational force that levitates the wire to a specified height.