The day of Ashura is the 10th of the month of Muharram and fasting on it is likable as told by the Prophet (PBUH) who said: "Fasting the day of Ashura is an expiation for the preceding year." [An-nissai` in Al-Sunn Al-Kobra].
In order for a person to receive the full reward from Almighty Allah, it is better that he/she fasts the 9th, 10th, and the 11th of Muharam, as stated by a number of scholars such as Ash-shafii` and others. If that was not possible, then he can fast Ashura with the day that comes before, or after it; however, if he fasted only on the day of Ashura, then it is permissible. Al-Imam An-nawawi (May Allah have mercy on him) stated: "The day of Ashura is the 10th of Muharam, and it is likable for a person to fast the 9th of Muharam as well." [Rawdat At-Talibeen].
Al-khateeb Ash-Shirbini said: "It is likable for a Muslim to fast on the 9th and 10th of Muharram to be on the safe side." [Mughni Al-Mohtajj].