Riding your dirt bike in sand can be the most difficult riding you'll do. To do it successfully requires a combination of strength and technique. The good new is the more time you spend on your bike, the more strength and technique you'll develop. So ride lots and ride often!
The most important thing you'll need to learn for riding a dirt bike in sand is to stand up. The surface and density of sand often changes, so even though it looks smooth, there can be a lot of hidden bumps and dips. Also, if you're in an area that sees a lot of dirt bikes, the sand will develop a lot more bumps than a hard-packed mud track.
Standing up allows you to absorb more of the bumps and go with the flow. If you typically don't ride standing up, start practicing whenever you can – you want to be strong enough and confident enough to be relaxed and in control when you hit that sand. Nervous, stiff and jerky means you'll end up IN the sand instead of riding across it.
When riding in sand, your dirt bike will want to wander a little bit. Stay loose, let it wander, and carefully correct as needed. If you try and fight the bike you'll just tire out that much quicker.
Just because sand is a tougher than usual terrain, don't fall into the trap of looking at the ground right in front of your bike. Keep your eyes forward – look at where you want to go... not where you are.
One of the biggest problems with sand is the way it sucks at your front tire – especially if you ease off the throttle. It's a good idea to shift your weight back a little farther than usual and apply a little more throttle than usual. You want to keep your tires on top of the sand, not plowing through it.
To take a turn, you'll want even a little more throttle, and lean a little further back. If your front tire digs in during a turn, it'll probably twist completely over, act as a brake, and send you over the handlebars. Since you're going to increase the throttle during the turn, it pays to enter the turn slower than you normally would. If you go into the turn too fast, you'll have to back off the throttle and recover, losing more time and control than if you had started slower and eased up your speed. In other words, you often have to go slower to go faster. If you do need to do some braking in a sand turn, only use the rear brake.
As you accelerate through and out of the turn, you can be a little more aggressive on the throttle since the sand is stealing a lot of your momentum, Don't let your back wheel spin too much though or you'll just dig in deeper and go slower.
Those are the basics – the rest is up to you. The more you practice, the better you'll get.