Frying or grilling a piece of meat does primarily the same job. Because of the high heat of both of these methods, the flavour is sealed into the meat as the outside cooks. This is where the common cooking term of 'sealing the meat' has come from.
This video is really helpful when it comes to cooking steaks, as the chef has some great tips to let you know when the steak is cooked to how you like it.
I would also suggest frying the steak if you want to add other flavours to it, as the pan can hold sauces and other ingredients as well as the meat. For example if you wanted to have some garlic and onions frying at the same time. This would be very difficult to do under a grill.
Therefore either process would work fine but for ease and better flavour I would advise frying.