We grow onions every year, but we almost always have some left over that didn't get used. They start sprouting in the spring, so we replant them.
They are best used as green onions because they will multiply (no problem with that unless you want big bulbs) and bloom early as Charlotte pointed out. You can use the bulb part, too, but you probably need to make sure it doesn't have a hard, woody center (just cut that part out and use the rest).
To gather the seeds, wait until the blooms are dry and then snip them off and toss the blooms into a Ziplock bag. You should then be able to shake out the seeds and remove the rest of the plant.
I've heard of people using garlic seeds for seasoning, but I'm never used onion seeds. A quick search online shows that onion seeds (nigella) are toasted and used in Indian dishes.
And, of course, you can plant the seeds next year. Just be sure to start them way earlier than you do most spring seed crops. In fact, you might want to look up the kind of onion you have and the best planting time for your area for it. I know around here you have to plant onions in the fall to get them for the next summer.