Avocado can be cooked. However, it can quickly become bitter over high heat, so it is often used raw (think guacamole, avocado toast, sushi, etc). If you want to cook with it, use it over low heat or as a finishing touch to hot-cooked dishes (like this one).