A shader is basically a material, you can think of them as the same thing. They are what draw colors onto the screen, draw the texture, affect the lighting and shadowing (that is why they are called shaders, because they "shade" objects).
The standard SpatialMaterial in Godot is, in fact, a shader itself. You can convert this to a ShaderMaterial and look at the code, if you want for educational purposes, but it is quite long and complex. But you can also click on a Mesh or MeshInstance, create a new ShaderMaterial, and then click the name to edit it (it shows in the bottom box).
Godot uses a variant of GLSL, but it is almost the same, so you can look at OpenGL tutorials and they still apply. But this will be more advanced and maybe confusing if you haven't done OpenGL/shader programming before. So I would recommend doing the 3 tutorials on this page first.
https://docs.godotengine.org/en/stable/tutorials/shaders/your_first_shader/index.html