Try opening a file. If it doesn't open in the correct application, quit the wrong application. Select the icon again. Hit Command-i.
In the resulting dialog, there will be a pane called "Open with" that shows the current application used for that file. Use that menu to choose the application you want to open that file, then click the "Change All..." button. This will set the chosen application as the default for all files of that type.