First, you pick a fresh, whole pineapple up at the store (or farmer's market, if you're lucky enough to have someone growing pineapples nearby). Make sure the crown is green, healthy and that the pineapple isn't overripe.
Next, you will twist off or cut off the crown. Make sure to trim off any additional flesh, leaving only the center and it's root buds. You'll also want to remove some of the bottom most leaves because, once planted, the leaves that are partially in dirt or touching the dirt will rot. Then place the crown upside down to dry in an area where the temperature does not fluctuate wildly. Leave it to dry for 5 - 7 days.
Once dry, you can plant your pineapple. Use a good quality potting soil and plant in a pot or, if you're in a temperate climate, you can plant it outside. Make sure to give it some room to grow. These plants can grow up to 6 feet wide. It can take up to 20 months for your plant to produce fruit, but imagine how exciting it will be to make that first harvest!
Further reading: University of Hawaii - How to Grow a Pineapple in Your Home