Made a lot of searches but none ended up clarifying my doubt.

When one use a static class or method, when does c# allocates memory for them? And does it get deallocated at all?

Bonus question: When should one use a static member or class?