SWRL (Semantic Web Rule Language) is a proposed semantic rule language based on combination of OWL-DL with Rule-ML.

SWRL is the Semantic Web Rule Language, formulated as a combination of OWL and RuleML. SWRL extends the definition of OWL axioms with Horn-like rules, thereby allowing additional inference capabilities, basic mathematical functionality and provide a formal meaning in an ontology. It was submitted to the W3C on 21 May 2004.

Rules take the form of logical implication with a rule antecedent(body) and rule consequent(head), each of which is composed of zero or more "atoms". These rules are read as "If the antecedent holds true then perform the actions in the consequent".

Rules can be expressed in a high level abstract syntax to express the Horn-like rules in OWL-Lite or OWL-DL or in the form of XML based syntax. The XML syntax based on RuleML and the OWL XML Presentation Syntax as well as an RDF concrete syntax based on the OWL RDF/XML exchange syntax.

The Official SWRL reference:
SWRL: A Semantic Web Rule Language Combining OWL and RuleML

Tools to write SWRL rules:
1) protege
2) Any text editor

Additional References:
1) owl
2) RuleML