Cooking juicy beef in a pan
The best way to test if it's done is to use an instant-read thermometer. Slide it into the thickest part, away from any bones. I like to lift up the meat with tongs and poke it into the edge, all the way to the center. You're looking for about 135-140F for medium rare; take it off a little early if anything because the temperature will go up a bit once it's off the heat. Let it rest for ten minutes or so before digging in to let the juices re-distribute.

I don't like using nonstick for steak, or olive oil. Neither does well at high heats, which is what you need to cook off moisture at the surface and get a nice browned outside before the inside gets overcooked. Cast iron and steel (stainless or carbon) both work very well in my experience. For fat, use a high smoke point oil like safflower oil, or clarified butter.