Huelva is a city between two International airports: Sevilla and Faro (Portugal), but if you have both options, Id recommend you to fly to Sevilla, because the city is well connected to Huelva, so you don´t have to wait so long to come here.
Faro doesn´t have as many buses as Sevilla, so sometimes you have to wait for hours or take a taxi, that is more expensive.
If you are flying to Madrid, as many people do, the cheapest option to reach Huelva is by bus, using Socibus, but you can travel also by train, more comfortable and so much faster. If you book in advance (better if you do it at least 15 days before) you can get similar prices as the bus, or maybe you will have to pay 5-10€ more, but you will travel for 3 hours instead of 8.
There is a high speed line between Madrid and Sevilla, or you can take the standard train to Huelva.
For prices and schedule, check the web Renfe.
The bus take around 8 hours from Madrid to Huelva, and the train, if you take the high speed line to Sevilla, will take around 3h30m (You can get prices and more details in other posts).
The train could be also a good option if you are flying to Malaga or Seville.