What is the difference between them?

What is the rule for usage of them?

Are they the same?