So what is it you are struggling with? I am thinking you are struggling to get the concept of variables?
In your line
String name = JOptionPane.ShowInputDialgo("Oh hi, What's your name?" );
You declare and initialize a String variable called name. This variable holds data so you can re-use it without having to request this information again. Anytime you wish to access its contents you would simply use the name of the variable.
Simply take a look at your code since you call it in the next line. Now since you are using String.format you can see that where %s is at it replaces it with whatever string you provide it with.
Here is an example to show you what is happening:
String name = "Henry";
int age = 20;
System.out.printf("Hello %s!", name);
System.out.printf("Hello %s, I am also %d years old! Goodbye %s", name, age, name);
As you can see you can use multiple variables in a single line. The letter after % specifies the type of data you are going to provide it. For example you can not %s and provide it an int or it will complain.
I know it was not my best explanation by far but hopefully you can get the gist of what is happening. If not be a little more specific on what you are attempting to accomplish.