What don't you understand exactly? Just try substituting numbers in it might make it easier for you.
The j loop is making sure that i number of stars are printed. Then when the loop exits, a newline is printed and the i loop reiterates, only i is decremented (so if it was 5 at first, it's now 4). The j loop does the same thing again, only now that i is 4 it'll output 4 stars before exiting the loop.