Constrained codes for digital storage systems are studied. A method for improving signal detection in digital magnetic recording systems is also investigated. The bit stuffing algorithm is a technique for coding constrained sequences by the insertion of bits into an arbitrary data sequence. This approach was previously introduced and applied to the family of $(d,k)$ constraints. Results show that the maximum average rate of the bit stuffing code achieves the Shannon capacity when $k=d+1$ or $k=\infty$, and fails to achieve capacity for all other $(d,k)$ pairs. A modification to the bit stuffing algorithm is proposed that is based on the addition of controlled bit flipping. It is shown that the modified scheme achieves improved average rates over bit stuffing for most $(d,k)$ constraints. All $(d,k)$ constraints for which this scheme produces codes with an average rate equal to the Shannon capacity are determined. A general framework for the construction of $(d,k)$-constrained codes from variable- length source codes is presented. Optimal variable-length codes under the general framework are investigated. The construction of constrained codes from variable-length source codes for encoding unconstrained sequences of independent but biased (as opposed to equiprobable) bits is also considered. It is shown that one can use the Tunstall source coding algorithm to generate optimal codes for a partial class of $(d,k)$ constraints. Bit-stuffing schemes which encode arbitrary inputs into two-dimensional (2-D) constrained arrays are presented. The class of 2-D $(d,\infty)$ constraints as well as the ǹo isolated bits' constraint are considered. The proposed schemes are based on interleaving biased bits with multiple biases into a 2- D array, while stuffing extra bits when necessary. The performance of the suggested schemes is studied through simulations. A method for joint detection and decoding of coded transmission over magnetic recording channels is considered. The standard framework of turbo equalization is modified to account for the colored noise present in high-density magnetic recording systems. The modified scheme incorporates a noise prediction algorithm, which iteratively and selectively whitens the noise, while utilizing the information produced by the turbo equalization scheme. Simulation results demonstrate the performance improvements obtained by the proposed scheme