Logic Of The Pattern

Can anyone explain me that what is the logic of the Patten program? For example
*
**




I want to understand the logic of the program.