The orca first appears in Sonic Adventure in Emerald Coast. It chases Sonic across the wooden planks on the water in the famous "Orca Chase".
In Sonic Heroes, two orcas appear at Seaside Hill and jump over the road just beyond the third island. They are smaller than the first one and don't seem to have a grudge against Sonic, serving as background visuals.
Sonic the Hedgehog (2006)
In Sonic the Hedgehog (2006), the orca appears in Wave Ocean and again chases Sonic across wooden platforms. Sonic hangs onto its dorsal fin and gets flung off when Tails closes the gate to keep the orca inside.
In the Nintendo 3DS version of Sonic Generations, at Emerald Coast, the orca is once again chasing Sonic (Classic in 2D and Modern in 3D). With Classic Sonic, it appears halfway through the stage, where it will chase him across a broken bridge. Sonic must runs and jump across the bridge it to avoid getting eaten or falling in the water.
With Modern Sonic, the orca is more aggressive. At the end of the stage, it jumps out of the water in a last attempt to eat Sonic. When this happens, the player must press as much as the screen prompts them to do in order to avoid the orca's bites and finally reach a platform where the orca bangs its head and falls back into the water.
In the console/PC version of Sonic Generations, in Seaside Hill, the two orcas return to help the Sonics. With Classic Sonic, they help him get across the water after he is launched from a cannon. With Modern Sonic, they sometimes jump out of the water when they see him running through and help him reach the end of the level after he gets launched off a ramp.
The Orca appears in beach parties this game jumping from one side to the other as part of the scenery.
In Sonic Runners, the Orca appears as a Rare Speed Type buddy which destroys platforms and increases Ring appearances for every 200 (100 same Type) combos.
In other media
In the Archie Comics published Sonic the Hedgehog and Mega Man comic crossover event, Worlds Collide, specifically in Sonic Universe #52, Sonic, Mega Man, Proto Man, Tails and Rush venture through the Skull Egg Zone, which contains numerous references to the Mega Man and the Sonic the Hedgehog video game series'. In one panel, Sonic and the others are walking over a boardwalk, when Sonic comments "If we get jumped by a whale out here, I swear..." This is most likely a reference to the infamous "orca chase" scene that appears in Sonic Adventure and later in Sonic the Hedgehog (2006).