Some times there are gaps between the close of one period and the open of the next period.
This is most obvious when each candle represents the period of one day, as there could be news overnight when the market is closed, and then the next morning the open can gap up or down depending on whether the new is seen as good or bad.
These gaps can also happen during intra-day periods like hourly, or minute candles when some economic news might be released which might directly affect the company in question.
Also, stocks that a less frquently traded, that is they have low trading volume, tend to gap a lot more often than do stocks with higher trading volumes that are frequently traded.