In Spain vaccination will be free and will be administered ONLY by the National Health System in the order that the Health Ministry establishes. There are different phases of the roll-out, depending on the age, health, etc, of all members of the public.
The vaccine is NOT available privately. It is for all residents of Spain, so if you are legally registered as resident here you will be called for vaccination when your group is eligible. If you have any concerns, or believe that your health condition merits vaccination in one of the early phases, you should contact your public health provider.
If you are not legally resident here, you cannot avail of the public health roll out of the vaccination and should find out about the procedures in your country of residence.
If you are legally resident here but have never used the public health service, you do have the right to a public health provider. Go to your nearest health clinic with your residency paperwork and register. If you are a British national and resident here but have not accessed public health services to date, here is a useful link to information from the British Government on registration for public health care in Spain.