The coffin is placed at the front of the congregation and the imam stands behind it. For men the body will be viewed after the prayer, however for women the coffin should be closed as non-mahram men are not allowed to view the body.
The funeral prayer is prayed in congregation and is unique from other prayers in that there is no bowing (ruku) or prostration (sujood), i.e. it is all performed standing.
The prayer itself consists of 4 takbeer (saying Allahu Akbar). After each one the following is recited (according to Hanafi school):
1) Thana'a (as recited at the start of the 5 daily prayers)
2) Durood (as recited in of the 5 daily prayers)
3) Dua for the deceased
Below is a dua for deceased one can recite:
اللَّهُمَّ اغْفِرْ لِحَيِّنَا وَمَيِّتِنَا وَشَاهِدِنَا وَغَائِبِنَا وَصَغِيرِنَا وَكَبِيرِنَا وَذَكَرِنَا وَأُنْثَانَا . اللَّهُمَّ مَنْ أَحْيَيْته مِنَّا فَأَحْيِهِ عَلَى الْإِسْلَامِ , وَمَنْ تَوَفَّيْته مِنَّا فَتَوَفَّهُ عَلَى الْإِيمَانِ
Translation: "O Allah! Forgive our living and dead, present and absent, young and adults, men and women. O Allah! Whoever among us is kept alive by You, keep him alive on Islam, and whoever You give death, let him die on Imaan."
The prayer is then concluded with salaam as with other prayers.
The body is then taken to the graveyard for burial.