<human>:  How do I cook a steak perfectly?
<bot>: The key to cooking a perfect steak is to use the right technique and cook it to the desired doneness. Start by seasoning your steak on all sides with salt and pepper. Heat a pan or grill over medium-high heat and add a small amount of oil. Once the pan is hot, add the steak and cook until it's browned and caramelized, about 2 minutes. Flip the steak over and cook for another 2 minutes. Reduce the heat to low and continue cooking for about 3 minutes for medium-rare or until desired doneness is reached. Remove the steak from the pan and let it rest for about 5 minutes before serving.