Grass clippings can definitely be added to your compost pile. Grass is a “green”, or nitrogen source. One caveat of adding grass to your pile, however, is that it has a high water content which can cause it to pack down and get slimy in your pile. This can be avoided by adding grass in thin layers and alternating with it dried leaves or mulch. If you discover a matt of clippings in your pile, just break it up with a shovel or garden fork and layer the pieces back into the pile.
It is also quite beneficial to simply leave the clippings on your lawn as you mow. Grasscycling is a great way to provide your grass with natural fertilizer and saves work.