From my understanding, Phonetics is the study of physical aspect of sounds, including how sounds are produced (articulatory phonetics), how they are perceived (auditory phonetics) and the physics involved in speech (acoustic phonetics).So it gives information about how many consonants and vowels constitute the sounds of that language, how they are pronounced, what their physical properties are and how they are classified. Phonology is the study of sound systems of language, i.e. How sounds are organized into patterns and systems, including phonological rules that link phonemes and allophones, syllable structures, stress and intonation. Are these correct? And what about phonetic and phonological features and phonemes and allophones? Are they under phonetics or phonology, or both?
This is a highly contentious matter where there is no agreement. For one, not everybody accepts the position that there is a division. For example, Sound Pattern of English have a single grammatical component, the phonology, which does everything except actually pull muscles, and the phonology emits instructions to muscles. On the other side, some people (Port, for example) maintain that there is no phonology. We have no mechanism for conducting opinion polls in the profession, but it appears that most phonologists accept the existence of distinct phonetic and phonological components.
Still, saying exactly what does in one component vs. the other is an mostly unresolved matter. There are various popular characterizations of the difference, centering around "deals in physics and articulation" vs "deals in abstract patterns", but an inspection of the literature in phonology and phonetics shows that many works in phonology deal in physics and articulations (features are defined in terms of articulation; a large part of phonology has reified perceptual and aerodynamic explanation into phonological principles – see The Phonological Enterprise), and phonetics does indeed deal with patterns, which are abstract. There is some discussion in this paper.
The question of "phonemes" versus "allophones" is an example of a highly contentious division. It is well-established in the phonetic literature that "phonemes" are subject to variation in production properties depending on contextual, in a way best described in terms of numeric equations and continuous functions. However, linguists are able to focus on certain subranges of those variations and call them "the same thing", imposing a categorial analysis on a subpart of a continuum – we call those "allophones". There are also cases where a language has phonological rules that split categories into two in some context, which rules are also called allophonic. There is no consensus as to which kinds of cases are part of phonology and which are part of phonetics, but a somewhat popular view is that if the process can accurately be described as a discrete partitioning of sounds into two categories, it is phonology (aspiration in English) and if it requires continuous functions, it is phonetics.