Comply is to act according to someone's wishes or rules. Although you might like to stay out with your friends, you'll have to comply with your parents' rules and be home by midnight.
Comply shares a root with the word, complete. In a way, when you comply with a rule or agreement, you are completing it, or completing your part in it. When someone is in compliance with an agreement or a legal ruling, that means that they have done everything they needed to satisfy the ruling. Comply with the rules of grammar or your English teacher will turn your paper red with ink!