You can learn to ollie while standing stationary, or while your skateboard is rolling. Ollying while standing still works the same way as while rolling, but I think rolling ollies are easier than stationary ollies. If you would like to learn to ollie with your skateboard stationary, you can place your skateboard on some carpet or grass to keep it from rolling. If you prefer to learn to ollie while your skateboard is rolling, don’t go very fast at the start. Whichever way you learn to ollie, once you feel comfortable you should try to ollie the other way as well.
To summarize, a skateboarder's feet need to do two things successfully to complete an ollie. They need to provide a changing force to move the board correctly (so that the combined force of gravity and the skater's feet add up to the green arrows above), and they need to provide different amounts of force with each foot (shown by the red and blue arrows above) to steer and turn the board into the right orientation.
The wheels of your skateboard can greatly affect your ride in numerous ways, such as the speed, your ability to take control of the skateboard’s movements, and what you feel while riding the board. The good news is that they come in various sizes, levels of durability, and colors, allowing you to pick one that suits your skateboard preference and style.
When I was about 10, I broke my first skateboard by riding it into a ditch. A decade later, in college, I broke another skateboard within an hour of owning it (surely a record) in a short-lived attempt at doing an ollie. (Surprisingly, the store accepted a return on that board even though it was in two pieces.) Then I was gifted a really nice, high-quality skateboard. The first thing I did with it was ride it down a big hill, a valiant but ill-fated adventure which ended with me jumping off the skateboard, rolling down the grass, and arriving scraped up, deflated, and rather disoriented near the entrance to my college cafeteria. (In my defense, the wheels and ball-bearings on that skateboard had been pre-lubricated to minimize friction, and why would anyone do that, that's just crazy.)
So the proper foot placement for the ollie is with the ball of your back foot horizontal on the tail of your skateboard.  And your front foot centered on your board right behind the front trucks.  You may find that moving your feet around in different positions are more comfortable.  This is fine,  everybody can learn how to skateboard their own way.
The good news is that majority of skate shoes today come with high-quality flat soles that are capable of providing the maximum surface area designed to let you come in contact to the board, thereby promoting better control. Look for a really durable shoe, which you can wear comfortably to guarantee a safe and enjoyable experience when you are skateboarding.

A rushed take-off might be the problem here. Steps 2-4 of this trick tip could help you out. In order to make your feet “stick” to the board, you have to do the movement fluidly. But don’t stress yourself out! You should rather start with some preliminary exercises until you feel safe while ollieing. It is also important to pull your foot up to your board’s nose in a straight manner to prevent it from spinning.
It wouldn’t be until the early 1980’s however, that a man named Rodney Mullen fully developed the skateboard ollie and brought it into vogue. Competing in the Rusty Harris contest in Whittier, California in 1982, Rodney Mullen used a back and forth motion on his skateboard to strike the back end of the board on the ground and using the front end to level the board out in mid-air – all from a flat surface. The audience’s jaws collectively hit the ground.
This board is an excellent option for beginners because of its simplicity and durability. The lightly concave design allows for simple turns but doesn’t require the rider to be an excellent navigator. You can start off riding this deck down the street and use it as you learn ollies, kickflips and how to drop in to a half pipe. It will withstand it all and look good doing it.