GTA 5 is the single-player story mode of the game, while GTA Online is the multiplayer component of it. They are both part of the same game world. However, cross-play between players in different platforms and versions is not yet possible.