I have following doubt on via creation.
Is a via surrounded by soldermask or not? If it has a soldermask layer then what happens if there is no soldermask layer around pad?
Give me brief explanation about types of vias?
It depends on your needs.
Most design software will give you the option to have open, or covered via.
Open via are usually used for R&D samples so that you can probe them to check voltage level.
In production, it is better to cover the via, because you can have solder bridges if you have high density and that will lower the yield of production.
There are many types. You can either choose to cover them or not with soldermask (if that counts as types).
Then you have throu via where the via goes from the bottom to the top layer, those are cheap.
You have inner via, or burried via, usually used in high density FPGA boards. This increase the manufacturing cost a lot.
You also have "via in pad" which is a via under a pad and that is also an expensive process.
You can also specify the thickness of the via coating if you have high current.
Unless specific needs, use throu via covered with soldermask. If you need to make test points, just use a pad as test point.