The law of the Lord is called torah in Hebrew. It means God’s instruction or teaching for his people (see study note on Deuteronomy 4:44).
Meditating involves inner reflection, which can be positive (Psalms 1:2; 63:6; 77:12; 143:5) or negative (see Psalms 2:1; 38:12). The Lord’s word is the object of godly meditation (119:48).
day and night: This includes all times, whether walking, standing, sitting, or sleeping (see Deuteronomy 6:7).