One of the most challenging tasks for language-learning infants and second language (L2)-learning adults is to segment the continuous stream of speech that surrounds them, and, following this, to acquire a lexicon. Both speech segmentation and lexical acquisition are known to be facilitated by phonotactics, i.e., language-specific restrictions on how phonemes may combine. This dissertation addresses questions regarding the representation and acquisition of such phonotactic knowledge in a native language and an L2. Five experimental studies are presented. The first three studies, using the artificial language learning paradigm, reveal that segmentation is influenced by structural phonotactic knowledge of OCP-PLACE, a restriction against pairs of consonants sharing the feature [Place]. It is shown that this knowledge is used only by native listeners or advanced L2 learners of a language restricted by the constraint. This suggests a language-specific acquisition from the input. The third study, with infants, shows that this input is continuous speech rather than the lexicon. The remaining two studies demonstrate that abstract phonotactic knowledge of syllable structure is represented separately from specific probabilistic knowledge, as the two have separate effects on lexical acquisition in a short-term memory recall task. Moreover, results from L2 learners suggest that probabilistic knowledge can be acquired independently of structural knowledge of the L2. While most studies have looked at the influence of specific representations of phonotactic probability, here it is shown that representations of abstract structural constraints also influence processing. Moreover, it is demonstrated that both types of phonotactic representations are acquired from the input.