が is a bloody annoying particle, its one of the 3 fundamental ones which you learn at the very start, the other 2 being はand を
You asked for some examples so here are some. が is used to emphasise things and answer questions relating too who, where, what, when etc. Soo if someone basically says ''Who is Derick'' you may put your hand up and say ''Watashi wa Derick'' but in this case it would to much of a general statement so instead you would say ''Watashi ga Derick'' because it is highlighting you are the one which is Derick, answering a ''who'' question.
Dont get annoyed about が I struggle with it still especially when I want to put it in but it conflicts with another particle that also needs to be there like と or も。