I just bought this plant but I don't know its name nor how to care for it.
Probably a variety of Euphorbia milii or crown of thorns plant. Care is easy, just give it a little water now and again and avoid getting it wet. It is native to Madagascar, so will prefer warm conditions. The flower colour is quite variable.
Yes this is clearly the succulent Euphorbia Milii.
From what I know this is a strong plant. The most important thing for it to thrive is to have long hours of direct sun. Behind a window would be OK, and maybe even better outside during summer.