How to create our own procedural texture like the default ones in blender
The 'built-in' texture nodes generate their textures mathematically and so most of them can be recreated using Maths nodes - building your own textures is no different.

For example, the Wave Texture can be created by using a Sine function based on the input coordinates :



Or the Checker texture recreated as follows :



Gradient textures follow similar principles - for example, a horizontal gradient :



The Noise, Musgrave, Magic, Brick, Sky textures can similarly be reproduced using maths.

Even something akin to the Voronoi texture can be recreated as detailed in this and this answer.

The Point Density and Image/Environment textures are an exception since those require additional input (the image or point cloud) - although in the case of the Point Density you could theoretically use Combine XYZ or Value nodes to set each of the point coordinates and maths nodes to calculate the proximity to each of those points - but it would quickly become too cumbersome to be practical as the number of points increases.

The 'built-in' textures will always be more efficient that doing these things using maths nodes but they can still be used in combination with each other and additional maths nodes and coordinate manipulation to generate interesting textures.

For further examples, see here and here.