Where can I find my edit profile file I'll try to make this as simple as possible.

I use Drupal Commons and want to add this code:

if (module_exists('user_badges')) {
    print user_badges_for_uid($uid);
}


to my profile user's profile page.

Does anyone know where I can find that?

What I want to do: https://www.drupal.org/node/942014
I've not used this particular distro, or module... there's not a block that already contains the user badges? There are several places you could add the code, there might be more:


Add a user_profile.tpl.php template to your theme, add the code in there.
Create a simple custom block with the code. You might have to get a reference to the User. I think your module would have to provide that (I don't think it is in the variables available to blocks)
Using a preprocess function for the profile in your theme. Might best work in combination with the tpl.
(not recommended) uses php filter, and put the php directly in a block.