I've just being doing something similar myself.
To get velocity you just multiply the acceleration by the time over which the acceleration occured
from my school physics this used to be represented as
V = U + AT
where V is new velocity
U is original velocity
A = acceleration
T = time that acceleration was occurring
So if you continuously sample the acceleration values and monitor the time between each sample e.g. using millis() or micros()
just taking one dimension the code would look a bit like this
float accelX= getAccelX();
vX = vX + accelX * (newTime - lastTime)/1000;
pX = pX + vX * (newTime - lastTime)/1000;
It won't actually work.
Because you are almost certainly going to have offsets in your acceleration data which bias it in one direction
Which is the problem I currently have.
I have not solved this issue as yet.
I've investigating various approaches, including
a) rolling average to remove offset in acceleration
b) assuming that the body is subject to friction and that velocity will tend towards zero over time
(Note point (b) will not apply if you are trying to determine the position of something like an aircraft or boat, its only of any use for items subject to friction that don't have their own means of propulsion
You could also look at the Kalman filter for helping to resolve the problems with acceleration offsets
Also, though my research, I think that perhaps the Arduino Uno etc is not a fast enough CPU. I'm investigating using a Due, and also investigating other high performance embedded controllers e.g. running at several hundred mhz to attempt to achieve better results
But depending on precisely what you are trying to determine the position of, it may not actually be possible to do it at all.