история is a series of events happened. Usually it's about real events, if it's a fantasy story, the story teller is supposed to indicate it. For example: "Вот такая история у нас случилась: родился телёнок о двух головах".
история as history is a different meaning of the same word. It's series of events from the past, described by a historian.
сказка is a fairy tale.
1) the result of someone telling история. For example:
- Вот такая история у нас случилась. [...]
Он закончил рассказ и ушёл.
2) A short story, usually published.
повесть in a past could be used for any quite long рассказ, but nowadays it's only a form of literature, similar to novel, which is much larger than a short story, but shorter than a general novel (роман). Philologist define difference between повесть and роман in main character(s) personality change. No changing at all is for a повесть, otherwise it's роман. In collocation, there is only size difference. For example, 200 book pages is повесть, 500 is роман.