You can put loops inside loops to do some wonderful and complicated things.
for (int i=0; i<3; i++){
for (int j=0; j<5; j++){
System.out.println(j);
}
}
Check this video for a general walk through:
https://www.youtube.com/watch?v=EClSzELKdR8
The basics of loops apply to nested loops so I will not expand on it further. The main thing you have to focus on is can you walk yourself through the execution of nested loops properly.