Code snippets are pieces of code that are saved for use again. Why re-invent the wheel?
Its like this ….. You build a lot of houses. You notice that most houses have the same parts like windows, doors, roofs, floors and so on.
So instead of making these parts every time for every new house, just make them once and save them for re-use each time you do a new build.
Or remember that really complex piece of code that took you hours to figure out? Keep it. You never know when you might need it again or something similar.
Sometimes your IDE will have a function that can save and interact with your snippets.
Snippet managers can be freeware, subscription based or one-off licensed.
When you sign up for an account with GitHub, you will be able to access its Gists functionality for saving snippets. This is cloud based.
Make sure your snippets program syncs to the cloud so you can retrieve them from different machines.
Read More about code snippets at Wikipedia.