Programming is just a way to tell your crystal how you want it to work with you. Think of it as like making a new business contact and being able to be completely honest about what you want from them. It is especially important to programme your Crystals if you are using them for Grid-work or layouts.
Before you sit with your Crystal have a little think about exactly what the purpose is you have in mind for this specific Crystal, so when you sit with it you can be clear and direct, it can get a bit messy if you have hundreds of thoughts rampaging through your head and the intentions can easily become confused.
Cleanse your Crystal! Article about how to do that here;
Sit quietly and hold the Crystal for a while, tune into it and when you feel ready give it concise, clear directions of what you would like from it speak either out loud or in your head.
An example of what you might say if it is a piece of selenite which you want to help you chill out say something like;
“I programme you to help me maintain my inner peace, for the highest good of all”, most importantly, you just need to say what feels right for you.
Programming is quick and simple and will let the crystal know what's job is, and will also help you focus your intention!