When to use が and when to use は


I am a little confused when speaking Japanese when I should use が and when I
should use は. For example, 学校はたのしかったです。or 学校がたのしかったです。What is the rule of when
to use が and when to use は in a context?

