Your cactus is Opuntia subulata. It can be grown indoors if given sufficient indirect light or outdoors in full or partial sun. It requires well draining soil and infrequent watering. More water during the hottest months will keep it looking its best. Can grow quite tall under the right conditions, but will remain smaller in containers, protect from hard frosts. This crested version O. subulata cristata will not get tall like the normal counterpart but will rather continue to make twisting and spreading fan-like growth. Occasionally it may put out a normal cylindrical branch known as a reversion. You can cut this off to preserve the crested appearance of your plant and pot it up by itself and grow the larger, branching normal form.