In the first of the films two post-credits scenes, we see that;
Steve Rogers and T'Challa are now on friendly terms with each other, with T'Challa even going so far as to help "store" Bucky Barnes until someone figures out a way to turn off his Hydra conditioning. Thanks to the fact that we see T'Challa follow Tony Stark to the place where the final fight takes place, we know that he knows where The Raft is.
As such, it could be that this character told Steve where it was, and maybe even helped him get there.
However, this is just one possibility. There are alternatives:
Natasha Romanoff was very involved in the process of signing the Sokovia Accords, and as such she might be privvy to the location of The Raft (and even if she wasn't, she's an elite spy; it probably wouldn't take her too long to figure it out). She leaves Tony's side after attacking T'Challa during the airport sequence, and as such could have told Steve the location of The Raft.
We know full well that Tony knows the location of The Raft thanks to seeing him visit it at one point. Although he and Steve don't exactly end the film on the best of terms, Tony seems receptive to Steve's letter at the end, and (more importantly) actively ignores Secretary of State Ross' phone call about a security breach at The Raft. It could be that Tony felt guilty about having so many of his friends imprisoned, and as such leaked the location of The Raft to Steve in order to break them out.
However, these are all just guesses based on what we see in the film. I doubt we will ever have a direct confirmation about how Steve found The Raft as ultimately, it doesn't matter. What matters is that he did find it.