If an electric dipole (e.g. a molecule with a positive and negative charge) is placed in a homogeneous electric field, then the negative experiences a force \(F_1\) towards the positively charged plate - that is against the electric field. The positive charge experiences a force \(F_2\) toward the negatively charged plate - along the electric field.
The dipole rotates until it is parallel to the electric field lines, such that the negative charge is on the side with the positive plate and the positive charge is on the side with the negative plate. In the final state, the torque on the dipole disappears and its energy becomes minimal. The resulting force on the dipole is then also zero in this state. The dipole don't move!
In the case of an inhomogeneous electric field (e.g. generated by a charged sphere) the dipole rotates until it lies along the field lines. If the charged sphere is positive, then the negative charge of the dipole turns toward the sphere because opposite charges attract. But if the sphere is negatively charged, then the positive charge of the dipole turns towards the sphere.
Furthermore, in an inhomogeneous E-field, the positive and negative centers of charge of the dipole experience a different force along and against the field lines, respectively. To bring the two forces into equilibrium, the dipole shifts in the inhomogeneous E-field.