Is there a difference between a prescription for glasses and contacts?

Sometimes. Eyeglass prescriptions and contact lens prescriptions sometimes look quite different. You cannot substitute one for the other but your ophthalmologist will write the proper one for you visual needs so the optician can fit your glasses or the ophthalmologist can order the proper contacts.
Yes. The difference is called vertex distance. This is an adjustment for where the corrective lens is placed in relationship to the cornea. In the case of contact lenses this is zero and usually for glasses it is about 12-15 mm therefore the numbers will be different (less negative or more positive) for contact lenses.