Yes there can, and yes there are. They are generally implemented as browser plugins. Flash and Java are the two prime examples, and Shockwave, Silverlight/Moonlight, and the Unity3D Plugin are also fairly popular.
Flash has gained native browser support for several browsers. Java once had direct browser support for a time both through Netscape and through what was once called the HotSpot web browser; the release model and continuous flow of bugs made Netscape decouple it, and HotSpot evolved out of being a compiler attached to a generic web browser, it dropped the browser aspect moving into a general Java development tool.