A slider should be thrown with good velocity and with a grip that will cause the ball to break with late, sharp movement down and away from the pitching arm side
How to hold a slider:
Typically with the index and middle fingers in line with a seam to the pinky side of the hand and the thumb placed underneath. Index finger (sometimes the middle finger) is usually placed directly on the seam or just on either side but still in contact with it
Fingers can be placed somewhat to the outside half of the ball but not much. Upon release, focus should be on the index and middle fingers coming down on the outside of the ball with the thumb rotating up, feeling the ball come off the index finger
Ball should move on two planes: right to left or left to right (depending on if you're LH or RH), and up to down. Amount of movement on these two planes varies from pitcher to pitcher, but typical movement is 2-to-8 on a clock for RH pitchers and 10-to-4 for LH pitchers
How to grip a slider:
Start by placing the middle and index fingers together, going with the seams at their widest point. You can place the middle finger directly on the seam, split the seam with the fingers or place the index finger on the seam. It's up to you and what feels comfortable. You can also use the same finger placement as you would on a 4-seam fastball but slightly more to the outside.
Here are some pictures of different slider grips...
4-seam slider grip
2-seam slider grip
How to pitch a slider:
As with every pitch, arm speed, arm slot and mechanics all stay the same. What makes this pitch work is the off-center pressure placed on the side of the ball at release by the middle and index fingers. At release, the wrist can be slightly supinated (turned in towards the head). To release the ball out of the hand correctly, try to feel the index finger come over and around the top, outer part of the ball.
A common mistake is try and snap the ball with the thumb and middle finger. This will cause unnecessary stress on the elbow. Concentrate on letting the pressure come from the middle and index fingers. Do not let the thumb become overly involved. Another good visual is to think of the ball coming off the side of the index finger that is closest to the thumb. Let the fingers cause the proper sliding spin on the ball and don't focus on snapping with the thumb.
Although it's not for everyone, learning the pitching grips of the slider are something older, advanced high school pitchers should seriously consider.