How to make an image of a character appear with dialogue?

Hey! New to Unity. I’m trying to make a side-scroller with visual novel aspects. If my player goes up to an NPC and begins a conversation, how would I make it so that when they are talking, an image of them appears in the dialogue box and vice versa when my player talks? additionally, how would I go about implementing branching dialogue with choices and have it show up in the same UI the dialogue is in. Assume that I just created a new project and have no code/scripts written yet. Here is a link to a video of a game for reference that is similar to what I am trying to accomplish.

You would use a UI Image for the picture that shows up with the dialogue.
https://docs.unity3d.com/ScriptReference/UI.Image.html

For branching dialogue you would want to code a state machine to handle it. A state machine is basically a series of if / else statements that keep certain things from happening unless some particular thing is currently happening.

This would probably be very helpful to you at this point:
https://unity3d.com/learn/tutorials

Thank you!