Topics relating to the question are not neatly partitioned due to the involvement of complex fields and perspectives (e.g., contribution from mathematics and computer science to logic). Risking over-generalization, this is how differences among the three fields can be understood. Logic is like the tools in the shed; philosophical logic is using the tools to better understand problems arising in philosophy; and philosophy of logic is to ask how the tools became tools proper. Let me elaborate.
Logic:
We want to understand how our ideas relate to each other. Natural languages are defective for this purpose. 'Morning star' and 'evening star,' e.g., have different ideas, although they refer to the same thing. So invented are propositional logic, first-order logic, and second order logic as tools to inquire relationships among ideas.
Philosophical logic:
Some philosophers realize that logic can help sharpen important concepts in their fields. For example, philosophers of mind or of knowledge or of language ask "What does it mean to know or to believe something?"; "What does it mean for something to be possible or necessary?"; and "How to change our minds rationally (belief revision)?" So invented are epistemic logic, modal logic, and defeasible logic, respectively.
Philosophy of logic:
Logicians wonder how the tools in the shed became tools. Surely, in a Flatland, a shovel would not have been a tool. Thus, the tools themselves became the object of study. For example, logicians ask "How this object came to exist as a tool?; "What logical approach would have been possible, had we understood logical particles (e.g., logical connectives and quantifiers) differently?: "What do we mean by the truth of a logical statement? Studies or topics relevant to answer these questions, respectively, are history of logic; Hilbert's axiomatic approach vs. Gentzen's natural deduction approach; correspondence theory of truth vs. deflationary theory of truth.