How does one do a hamstring strecth? Would a tight hamstring cause your knee to slip out of place?

Many ways/No. Use theraband or rope lying on your back, or sit on floor with 1 leg out. Will not make knee go out of place.
Muscle balance. The hamstrings run from the buttocks to just behind the knee. A tight hamstring by itself will not cause the knee cap to slip out of place, but imbalance and lack of coordination between the muscles on the front and back of the leg (quad/hamstring) can cause uncomfortable pulling on the knee cap. Physical therapists can evaluate your mechanics and show you how to do stretch/balance muscle activity.