Depends on the cat.
i had one that was happy indoors, with a stroll around the garden now and then. Never attempted to get out, would only go out if you went with it.
then I had another who screamed all night to be out. Literally howling. No sleep at all. Absolutely no way anyone could live with that cat as an indoor cat.
pp mentioned bengal cats- I always find it fascinating that breeders and enthusiasts insist they are indoor only. The bengals I have known have been massive wanderers with huge territories, and also very difficult to live with as indoor cats.