Playpens are frequently used by parents for a number of reasons. The first is to keep the baby safe, perhaps out of reach of a family dog or older toddler. The second is to entertain the baby in a confined, controlled space. The third reason parents often use playpens is for sleep. Playpens are sometimes used as a portable crib, especially when traveling.
Four to six months
Newborns should not be kept in a playpen. They need a lot of stimulation from adults, but the distance from a newborn lying in a playpen to an adult's face is much too large to provide stimulation. Not only that, but newborns cannot move enough to entertain themselves in a playpen. Wait until your baby is old enough to roll over, grasp a toy and lift her head before placing her in a playpen. Introduce her to the playpen at no later than 4 months so she can become comfortable with it by the time you use it frequently. If you wait until she is older, she might be too scared of the new place to ever feel safe in it.
Six to eight months
This is the ideal age to use a playpen. At this age, most babies can sit up, reach for and grab nearby toys. Babies of this age are generally easygoing, so you can leave them in the playpen (always staying nearby, of course) for a short amount of time without the baby putting up too much of a fuss. Babies this age also love new toys, so be sure to put some in the playpen with him. Do not try to tie any toys to the sides or top of a playpen, as cords or strings can present a choking danger for babies.
Eight to ten months
At this age, your baby is probably starting to crawl and even pull herself up. For this reason, she might be getting tired of being in the playpen. She probably wants to explore a larger area and might even stand up in the playpen and cry if you don't lift her out. Keep her happier in the playpen by providing new toys that she hasn't seen before. You will probably have to stop using the playpen once your baby can walk well because she is more than likely to protest loudly once she can walk if you try to confine her to a small space.