A rule was a binding principle which governed one's conduct in regards to a specific situation.
In 1968, Roberta Lincoln would not allow Captain James T. Kirk and Spock to find Gary Seven in a government office because it was against the rules. (TOS: "Assignment: Earth")
In 2374, when Seven of Nine, a former Borg drone who had been restored to Humanity attended Neelix's celebration of the Talaxian festival of Prixin, Captain Kathryn Janeway asked her if she was having fun. Seven, however, told her that she was not and Janeway told her that it was because she was standing by herself. She complained that she did not understand the rules and procedures for the occasion and Janeway told her that she should find a group, listen in on their conversation and then chime in when she felt she had something to contribute. Seven then attempted this by listening to the conversation between Samantha Wildman and the Doctor regarding the rapid growth of her daughter Naomi Wildman due to her Ktarian heritage. Samantha, however, was put off by Seven's attempt, in which she explained that children assimilated by the Borg were placed in maturation chambers. (VOY: "Mortal Coil")