How to deal with seasonal expansion and contraction of wood indoors?
Jack's answer is completely correct. I will simplify the answer with some easy advice.  Use some acrylic painter's caulk in a caulking gun, never use a silicon based product in this situation. When you cut the tip, only cut off enough to leave about an 1/8 inch opening at the tip. You want to push out a very thin bead of caulk that can be "pushed" into the offending gaps. Smooth the caulk with a wet finger or damp cloth. This will remove excess caulk and/or push it into the gaps at the same time. This type of caulk is water soluble so clean up is easy.  Let the caulk dry as prescribed on the product tube before painting. Hint:  I have found that Dap painter caulk dries and stays very white as opposed to Liquid Nails brand that seems to have a more yellowish color when cured.  If you are going to paint, the cured color won't matter.