Artificial gravity is a replication of gravity which is used to make people in space more comfortable. When artificial gravity is used, people experience conditions similar to those on the surface of the Earth. In addition to making people feel more secure in their environment, the use of artificial gravity also reduces the problems associated with prolonged periods of weightlessness, including loss of muscle tone.
Science fiction has explored this idea for a long time, and numerous depictions of the concept can be seen in works of science fiction. For films and television shows, it's easier to film people in an environment similar to that found on Earth than it is to mimic low-gravity conditions, adding incentive to incorporate the presence of artificial gravity into the plot. The mechanisms used are usually imperfectly explained, illustrating how challenging it is to create gravity which will work effectively.
One of the most straightforward ways to create artificial gravity is to rotate a space ship or structure, but this necessitates building a very large structure, and places limitations on the design. Engineers have expressed concerns that such designs may be impractical and difficult to execute. Researchers have also proposed creating gravity by filling the core of a structure with enough mass that it creates its own gravitational field.
Other proposals include the use of magnetism, which has worked in small-scale experiments in laboratory environments, or utilizing basic physics with linear acceleration. As long as a spacecraft is in motion at a high enough rate of speed, the people on board would experience something like gravity. A reduction in speed or halt would allow people to become weightless again. It is also potentially possible to use two space ships together to create artificial gravity.
The need for artificial gravity is one of the major barriers to space travel. People who spend too much time in low gravity or free fall environments can develop serious musculoskeletal problems, which is very undesirable. Low gravity can also be very frustrating, as objects need to be carefully secured for safety, and ships must be designed with special features which allow them to cope with minimal gravity.
Proponents of space colonies and settlements in far-flung corners of the universe are especially interested in being able to mimic gravity. The ability to replicate conditions on Earth would be critical for the success long term settlements in space or on low-gravity planets. There are numerous other obstacles to such settlements, of course, including concerns about radiation and the need for a friendly atmosphere.