Through acceleration.
Gravity and acceleration are equivalent: they're each associated with a force that's proportional to the mass of the object. Amusement parks take advantage of this in "virtual reality" theaters: they simulate acceleration with gravity, by rocking the seats backward or forward to simulate speeding up or slowing down. Artificial gravity in space is the converse: simulating gravity with acceleration.
Acceleration can be linear or centripetal.
Continuous linear acceleration requires continuous energy input. The kinetic energy is proportional to the velocity squared. It's prohibitively expensive and doesn't allow you to stay any place for very long -- including near-earth orbit.
Centripetal acceleration is acceleration toward a center point -- it changes the direction of motion but not the tangential speed. Everything that rotates experiences "artificial gravity." That's why curves in roads -- especially high-speed race tracks -- have to be banked. For an object spinning in space without friction, it takes energy to start and stop the rotation, but it doesn't take any energy to sustain a constant rotation. Conservation of momentum keeps the object spinning. Constant centripetal acceleration (through rotation) is much more sustainable than constant linear acceleration, and it also allows the spinning thing to remain in orbit around the Earth or Sun or other planet.
You can find an artificial-gravity calculator on-line at: http://www.artificial-gravity.com/sw/SpinCalc/
You can find more information at: http://www.artificial-gravity.com/