Those seeds are indeed from a cosmos bipinnatus. I don't know your climate, but I've had great success growing them, and other cosmos varieties, in Northeast United States, growing zone 6. I purchase the seeds here. I'm not affiliated with the company in any way, but am using them as an example because in my experience they're reliable and the seeds are high quality.
I love cosmos in general because they come in many pretty colors, have a long blooming season, and are great for attracting butterflies and bees. They're also extremely easy to grow, making them a great choice for beginners of all ages.
I plant them directly outside any time beginning in late May or early June, after the danger of frost has passed. You can just loosen the ground a bit and put each seed in a hole just deep enough to cover it, approximately a half-inch. I put the seed in vertically, rather than sideways, but I don't know if it matters. Water the area well, and make sure to keep it moist until the plant starts to peak out of the hole!
They germinate very quickly, within a week or two, and, with not much more than a sunny spot and some steady watering, they're in full bloom in about a month. I especially appreciate that because they easily fill in those empty spots I find in the summer, either from poor planning or because something else has gone by. Even if I sow the seeds in early August, I can get hardy plants that bloom profusely until after the ground freezes.
They're an annual where I live, but, as you've noticed, they do drop seeds. If neither I nor the birds collect them, some will survive the winter, providing a nice surprise the following spring!
The picture against the fence is of a bipinnatus I grew a few years ago. It's full grown and just preparing to flower. Unfortunately I can't find a picture of that one in bloom. The flowers looked exactly like the picture from the link in the catalog, so I've provided that for reference.
