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 ship's main engine to provide apparent gravity for ship inhabitants. "Down" will always point towards the engine providing thrust, encouragins ships to be laid out in a so-called "skyscraper" format where the lower floors are near the engine(s) and the upper floors are further away.