Though many are technically perennial or biennial, these plants are usually grown like annuals; seeds can be sown indoors, but flats of young plants are inexpensive, readily available, and offer more immediate satisfaction.
Transplant them into beds with well-drained, rich soil and steady sun (for the earliest spring blooms, plant outdoors in the fall); or mimic those conditions in containers: Cover drainage holes with pot shards, fill with a good soilless potting mix, and place in a sunny spot. Water when dry, feed occasionally, and pick flowers and deadhead regularly, which encourages new, healthy blooms.
In a window box, pansies combine well with other plants, like dwarf astilbes, alliums, and dark-leafed coleus. Plant pansies along the front edge, and layer leggier plants behind them.