This is likely a yucca, a full-sun succulent with great architectural value in the garden. Its flower spikes are taller than the plant itself. Water this drought-tolerant plant sparingly. Depending on the species or cultivar some remain 3 ft. tall but others can grow 10-12 ft. tall and 8 ft. wide so be careful about siting it near walls, sidewalks, and irrigation pipes.Once established they are difficult to move. As Yucca mature, their trunks become a bulbous mass and can crack walls, pipes, etc. and the leaves are very sharp. Feed with a slow-release or organic fertilizer only if you want the plant to grow faster. Most species tolerate temperatures below freezing. If this is a Spanish bayonet, it will reach 8 ft. tall or more and almost as wide.