Setting a pick in basketball is positioning yourself in such a way (legally) that your teammate will be able to get away from the person who is covering him.
Say Andrew is your teammate, and Bob is on the other team, covering Andrew. You come up close behind Bob, so that when Andrew runs by you, Bob bumps into you and can't keep up with Andrew.
You have to be careful when setting picks to do it legally. The most important thing is that you must come to a complete stop (both feet on the floor, and not moving) before the person you are setting a pick on bumps into you. If you are still moving when they bump into you, you'll be charged with a foul for setting a moving pick - and you don't even have to be moving very much. Any movement at all and you usually will be charged with a foul. However, if you have come to a complete stop you should not be charged with a foul. And in fact, if the person you set a pick on bumps into you really hard, THEY can be charged with the foul.
Picks work best when the person you are setting them on can't see you (ie. when you come up behind them)