Head-butting, eye-gouging, biting, hair pulling and spitting are not allowed in the octagon. Other not so obvious dirty fighting moves are fish hooking (sticking your finger in an opponents mouth and pulling to the side), grabbing the clavicle (that bone between your neck and shoulder) and flesh grabbing (pinching, clawing and twisting the skin). It is also illegal to hold the clothing of a fighter such as their shorts or gloves, or use the fence to gain leverage or trap an opponent.
Fighters are never allowed to direct attacks to the groin. Since kicking is a big part of UFC fighting, accidental shots to the groin are bound to happen. The referee will usually give a warning, If the attack happens again, the offending fighter could be disqualified.
UFC rules also protect the fighter from potentially fatal or paralyzing attacks. Strikes to the opponent's spine, throat or back of the head are illegal. Striking downward with the point of the elbow, and kicking to the kidney with the heel are illegal now though they were allowed in the early days of UFC.
Hitting an opponent on the ground is necessary in the UFC, but it is illegal to kick or knee the head of a grounded opponent. Punching or elbowing is okay as long as it is not directed at the back of the head. It is also illegal to stomp a grounded opponent.
It is illegal to attempt small joint manipulation that could break the fingers or toes of a foe. Submission moves are limited to the larger joints, such as an arm bar or ankle lock. No fighter can put a finger into any orifice or cut.
A fighter cannot attack an opponent that is under the care of the referee, or after a bell. This can lead to immediate disqualification. The referee's warnings and commands must be obeyed at all times. Swearing at a foe, or threatening violent actions outside of the ring is also not allowed.
A few UFC rules are designed to keep the fight interesting. A fighter can get penalized for running from an opponent, faking an injury, or spitting out a mouthpiece. It is also against the rules for a corner to "throw in the towel" to stop a fight.