This transformation from K bit block to "n" bit code block could be considered in terms of vector equation which is C equals to m G. C is a code vector, 1 into "n" code vector, m is a 1 into K code vector and G is a K into "n" generator matrix. One can show that a linear feed-back shift register can do the same operation. That is if you can use a linear feed- back shift register you could generate the parity check bits in a very easy fashion and as a matter of fact this is what is done in cycling codes using algebraic coding theory sets.
When we talk of error correction then it is possible that there could be just one error per block of coded bits that we have transmitted. There could be two errors, there could be many errors. Suppose that there are "t" errors that may occur in a particular situation, over a particular channel environment, then the minimum distance between two code words must be grater than equal to t+1, where the distance of two words is the number of bit-errors in which they differ.
So, if we want to correct a single error, the minimum we will be equal to three, for example, in the case of Hamming code, the minimum distance for Hamming code is three.
Naturally if we want to have a general scheme, then one would like to have a coded structure having maximum minimum distance.