The major difference between these two types of participatory democracy is between who originates the ideas. In one, the idea for the law comes from the people where in the other, the idea comes from the legislature.
In the case of an optional referendum, the idea for the law comes from the legislature. The legislators have an idea for a law that they want to pass. However, for whatever reason they feel that it is important for them to see what the public thinks about that law. Therefore, they submit it to the people as a referendum. The people can vote for or against the law, thus deciding whether it will become law. But the origin of the law was with the legislature, not with the people.
By contrast, an indirect initiative starts with the people. Some person or group proposes an initiative. If they get enough people to sign petitions in favor of the initiative, the initiative can be submitted to the legislature. If the legislature wants to, it can pass the initiative into law on its own. If it does not like the idea presented in the initiative, the people will get to vote.
In both cases, the people get to vote, but in the referendum, they are voting on an idea that the legislature came up with while, in an initiative, they are voting on an idea that a private person or group originated.