Each prayer has a time that begins and ends, and praying in its time is a condition. Allah says that prayer is a prescribed obligation at fixed times for the believers (4:103). The Prophet ﷺ taught the beginning and the end of each time, as reported in Sahih Muslim.
1When each time begins and ends
Fajr: from true dawn until sunrise.
Dhuhr: from when the sun passes its highest point until the shadow of an object equals its length (the Asr time starts).
Asr: from then until sunset. The preferred time ends when the sun turns yellow. The permitted time lasts until the sun sets.
Maghrib: from sunset until the red twilight disappears.
Isha: from the disappearance of the twilight until the middle of the night (the preferred time), and until Fajr for those who have an excuse.
2Practical rules
Prayer before its time is not valid. If a person prays by mistake before the time, he repeats it.
Whoever wakes up for Fajr after sunrise, or forgets a prayer, prays it when he remembers.
Use a reliable timetable for your city: the page on prayer times here gives them for any place.
Where the schools differ
The four Sunni schools agree on the main ruling above and differ in these points. No school is preferred here.
The start of Asr. the Hanafi school (Abu Hanifa) says it starts when the shadow is twice the length of the object, while the other schools say it is once the length of the object. The difference is about 30 to 60 minutes.
The start of Isha in the Hanafi school (Abu Hanifa) is after the white twilight, while the other schools say after the red twilight.
Maka apabila kamu telah menyelesaikan shalat(mu), ingatlah Allah di waktu berdiri, di waktu duduk dan di waktu berbaring. Kemudian apabila kamu telah merasa aman, maka dirikanlah shalat itu (sebagaimana biasa). Sesungguhnya shalat itu adalah fardhu yang ditentukan waktunya atas orang-orang yang beriman.
Dan dirikanlah sembahyang itu pada kedua tepi siang (pagi dan petang) dan pada bahagian permulaan daripada malam. Sesungguhnya perbuatan-perbuatan yang baik itu menghapuskan (dosa) perbuatan-perbuatan yang buruk. Itulah peringatan bagi orang-orang yang ingat.
Dirikanlah shalat dari sesudah matahari tergelincir sampai gelap malam dan (dirikanlah pula shalat) subuh. Sesungguhnya shalat subuh itu disaksikan (oleh malaikat).
From the Sunnah
Sahih Muslim 612aAuthentic collection
The point of the hadith: The Prophet ﷺ taught the beginning and the end of the time of each prayer.
This is general information, not a fatwa. For your own situation, ask a qualified scholar.
Fiqh questions
The times of the five prayers
Each prayer has a time that begins and ends, and praying in its time is a condition. Allah says that prayer is a prescribed obligation at fixed times for the believers (4:103). The Prophet ﷺ taught the beginning and the end of each time, as reported in Sahih Muslim.
Is this a fatwa?
No. It is a summary of well-known rulings with their evidence. For your own case, ask a qualified scholar.
What if my school differs from this answer?
Follow the view of the school you follow and the scholar who teaches you. The page lists the differences of the four schools.