The narration is from Imam Baqir (a.s.): "There are three things which are among the most important obligations of believers." One of these things is that one should treat other people in a fair way. That is to say, when one has to decide between observing justice at the cost of sacrificing oneself and not sacrificing oneself at the cost of ignoring justice, one must opt for the former. Whenever your opponent is in the right and you are wrong, act justly and accept that you are wrong although this means you have to swallow your pride. This is very difficult, but very important. Imam Baqir (a.s.) says that this is among the most important things that must be done and of course it is difficult. And no good deed and great work is possible without going through a certain amount of hardships. The second thing that is important is helping one's religious brothers in all matters. One should consider it a responsibility to offer help in intellectual and physical matters and in matters relating to honor. The third thing that is important is "divine remembrance in all states". One should always remember God. This is divine remembrance.
In the same narration, Imam Baqir has interpreted "remember God in all states" in the following way: "He who remembers Allah the Exalted when committing a sin, divine remembrance stops him." Divine remembrance prevents people from committing sins - different kinds of sins, including lying, backbiting, hiding the truth, being unjust, insulting people, appropriating what belongs to others and to weak people and treating other people in a careless way. These are different types of sins. In all these things, one should pay attention to God. One should engage in divine remembrance in order to avoid these sins.
"... and divine remembrance comes between him and the sin and this is the meaning when Allah the Exalted says, 'Surely those who guard (against evil), when a visitation from Satan afflicts them, they become mindful.'" Imam Baqir (a.s.) says that this is the interpretation of the ayah which says, "Surely those who guard (against evil), when a visitation from the Satan afflicts them, they become mindful." [The Holy Quran, 7: 201] When Satan visits them - that is to say, when Satan has not yet permeated their entire being - they immediately remember God. "... and then they see." This divine remembrance opens up their eyes and makes them insightful. This is the meaning of "remember God in all states."