Coconut oil is primarily a great cooking oil because of its stability at high temperatures. When oils are heated, they begin processes of oxidation and polymerisation that can lead to harmful by-products such as aldehydes.
The advantage of coconut oil is that it consists mostly of (healthy) saturated fats, which are more stable at high temperatures than mono- and poly-unsaturated fats. This makes frying with coconut oil a safer option. (This primer on the chemistry of frying oils explains in more detail the changes oils undergo when frying and why using saturated fats is preferrable when frying.)