As you know a shamrock is considered good luck, as such you may have received a shamrock plant as a good luck gift on St Patrick's Day.
There is, of course, a difference between the shamrocks that grow in your backyard (which many believe to be a weed) and your houseplant.
Shamrock is an Irish word for clover. It is a species of Oxalis or wood sorrels. As noted above, many consider it a weed, but it is great for pollinators on your small farm.
Shamrock houseplants are likely a different variety of Oxalis, and the flowers come in an assortment of colours: white, red, yellow, and even pink. They can have three of four leaflets, which can be green, or even red and purple.
To keep your shamrock houseplant thriving, ensure that it has well-drained soil, that is slightly moist. The shamrock will do well in bright, but indirect sunlight and it prefers to be in a cool environment at night. Be sure to fertilize at least once per month.
It is normal for the shamrock to go dormant after a few months. As the leaves begin to die back, and begin going dormant, you should stop watering the shamrock and allow the plant to turn brown to give it a "rest". Once you have removed the dead leaves, place the houseplant in the dark in a cool spot for a few months.
After two to three months of rest, repot the shamrock in new soil, move the shamrock into a bright area, begin applying fertilizer and water again regularly.