"It's a long story" is an expression that people use when they don't want to explain something because it will take too long. You use it like this:
A: You guys broke up? Why?
B: (Sigh) It's a long story.
You can use this expression when someone asks you a question about something complicated, and you don't have time to explain it. Or if just don't want to explain something, you can also use this phrase.
When someone tells you "It's a long story" but you want to know more, you can say "Give me the short version":
A: What happened?
B: It's a long story.
A: Give me the short version.