Great question! Generally, it is not a good idea to mix oil paints and acrylic paints together on your palette before applying them to the canvas. Acrylics are water-based, and oils are oil-based, so they each have different properties and different needs (in terms of drying time, type of varnish, etc).
If you want to paint one first and then the other, it is okay to paint oils over acrylics, but never paint acrylics over oils. So for example, you could gesso your canvas and then apply a few layers of acrylic paint. Once the acrylic paint is dry, you can safely paint over it using oil paints. Many artists like to do this because it allows them to enjoy the properties of both types of paint.
What you should not do is paint a layer of oils and then paint over it with acrylics. Here’s why: the acrylic paint will be unable to stick to the oil paint, so it will flake off. This can sometimes happen very quickly, almost as soon as the acrylics dry, or sometimes it can take weeks. In any case, the acrylic will definitely flake off at some point.
So in short, you can use both oil paints and acrylic paints in your painting – just be sure to use oil over acrylic, and not acrylic over oil – and don’t mix the two on your palette!