There are two known ways to provide artificial gravity: centrifugal and accelarative.
Centrifugal
Centrifugal artificial gravity takes advantage of apparent acceleration due to centrifugal force. Suitable for space stations and large spaceships, it creates gravity by rotating a cylinder containing habitats. Apparent "down" of a centrifugal system will always point away from the axis of rotation.
Accelerative
Accelerative artificial gravity takes advantage of the burn of a main engine to provide apparent gravity for spaceship inhabitants. Apparent "down" will always point towards the engine providing thrust, promoting a skyscraper layout of a spaceship.