The Church gives two options for the Vigil and three possible rites for use with the family and close friends. Let’s read:
45. The section entitled “Vigil and Related Rites and Prayers” includes rites that may be celebrated between the time of death and the funeral liturgy or, should there be no funeral liturgy, before the rite of committal. The vigil is the principal celebration of the Christian community during the time before the funeral liturgy. It may take the form of a liturgy of the word (see nos. 54-97) or of some part of the office for the dead (see Part IV, nos. 348-395). Two vigil services are provided: “Vigil for the Deceased” and “Vigil for the Deceased with Reception at the Church.” The second service is used when the vigil is celebrated in the church and the body is to be received at this time.
This is descriptive enough. You can do a Vigil in a church or elsewhere. The intent behind the rites is that once the body is brought to the church for the Vigil, it remains there until the end of the funeral liturgy. Did you know that the Vigil may be either a Liturgy of the Word or celebrated as part of the Liturgy of the Hours?
“Related Rites and Prayers: includes three brief rites that may be used on occasions of prayer with the family: “Prayers after Death,” “Gathering in the Presence of the Body,” and “Transfer of the Body to the Place of Committal.” These rites are examples or models of what can be done and should be adapted to the circumstances.
Three possibilities: loved ones pray just after the moment of death, when the body is to be prepared for embalming, presumably at the funeral home or other facility, and if there is to be no funeral liturgy (perhaps because of the lack of a resident priest) prayers will take place before heading to the grave.