Grace notes are always positioned before a notehead, even if they are intended to be played on the beat rather than before the beat. They are normally placed after a barline, so they can be positioned directly before the notehead to which they are attached.
What is the difference between a grace note and an appoggiatura?
An appoggiatura is a nonchord tone — that is, a note that doesn't fit into the current chord — that is approached by leap and resolved by step. So a grace note is a rhythmic device and an appoggiatura is a melodic/harmonic device.
How do grace notes work?
In performance practice, grace notes function as an acciaccatura, a term in music theory that describes ornamentation or embellishment. This means that the grace note is not stressed but instead glides quickly into the principal note, which receives the primary stress.