To bring your children to Spain, they must be minors or disabled (i.e. serious illness or disability, legally deemed unable to work).
You must first apply for temporary residence for family reunification. To do this, you must prove that your income is sufficient for their upkeep; you'll need to provide salary stubs, income tax forms, etc. You must also be residing in a suitable home; applicants must show this through a report on habitability of the home (informe de habitabilidad de la vivienda) either from the municipality or through a notary stating that you have requested a municipal habitability report at least 15 days previous. You must also show proof of parenthood with a birth certificate which must be legalised with the Hague Convention Apostille.
If the application is approved, you must send it to your family in your country of origin so that it can be submitted to the Spanish Consulate there. They must then apply for a residency visa for family reunification. This visa will allow your children to enter Spain. They then have 1 month to apply for a residence permit.