1. An apparatus for separating a foreground and a background, comprising: a background model creation unit for creating a code book, including a plurality of code words, in order to separate the foreground and the background; and a foreground/background separation unit for separating the foreground and the background using the created code book, wherein the background model creation unit rearranges the code words of the created code book on the basis of the number of sample data belonging to each of the code words.