The difference between the two may seem counter-intuitive at first. Also, the idea that any exercise works any single muscle group is slightly untrue - for instance, doing a dumbbell fly may "isolate" your chest, but it still certainly involves your delts and biceps as stabilizing muscles, etc. Even opposing muscles get some activation in an exercise.
Having said that, regular deadlifts where you bend at the knees, squat down and pick a bar up typically work your back more. You get glute work as you pull from the floor, but once you're past your shins it requires lower back work to complete the movement.
To work your hamstrings, you typically use a "straight-legged" deadlift. I put straight-legged in quotes because you don't need to (and probably shouldn't) keep your legs "straight". You bend at the knees just slightly to remove pressure from your lower back, but you keep your legs in one position throughout the entire movement. Your knees don't bend or unbend once you are set.
You still keep your back straight with no rounding. The idea is that when you bend down to pick up the bar, you are stretching your hamstrings - as if you were touching your toes. When you stand up, your hamstrings are pulling your butt closer to the back of your knee.
You will need to lower the weights from what you typically use for a deadlift and depending on your mobility/range of motion you may choose to stop lowering the weight when it gets around your shins without it hitting the floor. The key here is to NOT round your back. At least for me, sometimes the tendency is to roll my shoulders forward (rounding my back) to reach the bar as it sits on the floor. I have good mobility, so I don't need to do this and I can touch the floor without rounding my back, but you have to be aware of this and if you can only lower to mid-shin without rounding your back, don't go further.