Your hero's star rating determines the level cap of that specific hero, up to a maximum of level 280 at 12-stars.
For example, a 5-star hero cannot level up past level 100. For that reason, increasing the star-rating of your heroes is very important, as battles will become more and more difficult as you progress.

Like the character's level, the star-rating is displayed on the bottom side of a hero's portrait.

Star-ratings higher than 5 will each have their own visual effect, as follows :
1 red star = 6 star-rating
2 red stars = 7 star-rating
3 red stars = 8 star-rating
4 red stars = 9 star-rating
1 blue star = 10 star-rating
2 blue stars = 11 star-rating
3 blue stars = 12 star-rating

The process which allows you to increase a hero's star-rating is called merging, and is accessible through the Merge menu.

As the name implies, merging requires you to sacrifice certain types of heroes in order to increase the star-rating of one specific character. Merging requirements are displayed upon tapping on your desired hero, and will always require copies of your desired hero, each with their appropriate star-rating, as well as fodder-heroes of your choice, which sometimes must be part of a specific faction.
The merging process has 100% chance of success and will never fail.

A successful merging process will increase your hero's star-rating by one.
NOTE: Only heroes which already have 4-stars or more can undergo the merging process. Below you have a table which displays the total cost for each star rating, both as a single merging process and as a total, starting from 5-star, going up :

1,2,3,4-Star : unobtainable through merging
5-star : 3x Main 4-star, 5x fodder 4-star, 3x fodder 3-star
6-star : 2x Main 5-star, 1x fodder 5-star
7-star : 1x Main 6-star, 1x Main 5-star, 1x fodder 6-star
8-star : 1x Main 7-star, 1x Main 5-star, 2x fodder 6-star
9-star : 1x Main 8-star, 1x Main 6-star, 1x fodder 7-star
10-star : 1x Main 9-star, 2x Main 6-star, 1x fodder 9-star
11-star : 1x Main 10-star, 2x Main 6-star, 1x fodder 6-star, 1x fodder 9-star
12-star : 1x Main 11-star, 2x Main 6-star, 2x fodder 6-star, 1x fodder 9-star

Total cost for :
6-star : 2x Main 5-star, 1x fodder 5-star
7-star : 3x Main 5-star, 4x fodder 5-star
8-star : 4x Main 5-star, 10x fodder 5-star
9-star : 6x Main 5-star, 18x fodder 5-star
10-star : 10x Main 5-star, 44x fodder 5-star
11-star : 14x Main 5-star, 73x fodder 5-star
12-star : 18x Main 5-star, 105x fodder 5-star