In this chapter, we review some historical understanding and recent advances on the Initial Mass Function (IMF) and the Core Mass Function (CMF), both in terms of observations and theories. We focus mostly on star formation in clustered environment since this is suggested by observations to be the dominant mode of star formation. The statistical properties and the fragmentation behaviour of turbulent gas is discussed, and we also discuss the formation of binaries and small multiple systems.