In the military, "KP" stands for kitchen patrol or kitchen police. It was used as a form of punishment in the past but isn't commonly used in that manner in the modern military.
KP is a duty that is sometimes used in boot camp or when first reporting to a duty station. In boot camp, recruits on KP work with the kitchen staff to learn basic cleaning skills and military methods for kitchen work. At the first duty station, KP is used as a way to break in the new arrival. KP includes tasks that help to keep the kitchen running smoothly, such as washing dishes, peeling potatoes and preparing food for the cooks.