What is the ruling on fasting?
Fasting in Ramadan is an individual obligation (Fard ‘Ayn) upon every mature, sane Muslim who is capable of fasting.
Fasting can also be recommended (Mustahabb), such as voluntary fasting on Mondays and Thursdays, fasting on the Day of Arafah for those not performing Hajj, and fasting on Ashura.
Fasting can be prohibited (Haram), such as fasting on the two Eid days, the Day of Doubt (Yawm al-Shakk), and the Days of Tashreeq.
Some types of fasting are disliked (Makruh), such as singling out Friday or Saturday for fasting without a specific reason and fasting on the Day of Arafah for a pilgrim.
What is the ruling on someone who eats or drinks thinking that the sun has set, then realizes that it has not yet set?
Whoever eats or drinks believing that the sun has set, then later discovers that it has not yet set, their fast is invalid, and they must make up that day after Ramadan. It is not permissible to break the fast before confirming sunset—either by seeing it, through personal reasoning, or by relying on the statement of someone trustworthy in their religious commitment.
Are school exams a valid excuse for breaking the fast in Ramadan?
School and university exams are not considered a valid excuse for breaking the fast, as most students take their exams while fasting without experiencing extreme hardship. Fasting does not conflict with exam preparation, and a Muslim seeks strength in obedience to Allah for both worldly and spiritual matters.
Should a person feel pleased, or have a virtuous vision after offering Istikhara (guidance prayer) in order to do what he/she had offered it for?
The result of the Istikhaarah is not necessarily that a person sees something (in his dream), or feels pleased, but the most important result of the Istikhaarah is whether a person is enabled to do a given matter or not.