"I thought it would have happened"
If it is a correct sentence, what kind of sentence it is? Is it Future Perfect sentence said in the past?
Please explain what does it means clearly as I am confused.
It's a future perfect said in reported speech (which is also used to report thoughts). And it would usually be used with some cut off point in time, because at the moment it is said, the future it refers to is now in the past.
Imagine the following:
Today is my birthday, but it's almost over. It's five minutes till midnight. I was expecting my friends to throw me a surprise party today. In fact, earlier today, at 6pm, I thought it would have happened by 10pm. But it didn't. I guess my friends aren't going to throw me a party after all.
So, yes, there is a future-in-the-past situation going on here. The speaker thought this thought at 6pm regarding the then-future time of between 6pm and 10pm, and he is reporting this past thought at 11:55pm.
However, the following scenario is perhaps more realistic, language-wise:
Today is my birthday, but it's almost over. It's five minutes till midnight. I was expecting my friends to throw me a surprise party today. I thought it would have happened by now. It hasn't happened yet, but there's still five minutes left of today during which it could happen.
Here, the time period involved is all the way up till the moment of speaking (by now), so in this case, the "future" he was talking about just finished the moment he said the words. It's still a future-in-the-past scenario, but in a way, it is talking about the present; because (as the minutes go by) the by now can be indefinitely extended by the speaker to cover the constantly occurring and reoccurring present moment. Also, notice the speaker still thinks it might happen any moment.
It means that someone thought something was going to happen and was surprised that it did not. There aren't many situations where this sentence makes sense, but it is grammatically correct.
The sentence lacks context but it is ok . the sentence after "I thought" is an implied conditional I mean there is an if-clause -in the third conditional - omitted because it is understood from the context .
simple answer but helpful :)