Do you need a licence to build, and fly a rocket (mainly flying)? Can you build any type of rocket and fly it anywhere at any time?
Are there regulations on what you can take to space?
Space Exploration Stack Exchange is a question and answer site for spacecraft operators, scientists, engineers, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
If we're strictly talking licensing (and assuming you're in the US), you need a lot of FAA licensing
The FAA issues a commercial space transportation license or experimental permit when we determine that your launch or reentry proposal, your proposal to operate a launch or reentry site, or your proposal to test equipment, design or operating techniques will not jeopardize public health and safety, property, U.S. national security or foreign policy interests, or international obligations of the United States.
You need to have the following inspected
You might qualify for an experimental license as well.
International regulations vary greatly (see Are there international regulations for launching objects into space?) but the US standards are nearly worldwide.
As far as payloads, I don't think there's any innate restrictions (beyond maybe nuclear material), but if you launch a satellite without a FCC license you could be in deep trouble
Space startup Swarm Technologies, which launched four tiny satellites without government approval earlier this year, has agreed to pay $900,000 to the US Treasury for the unauthorized flight. The fine is part of a settlement with the Federal Communications Commission, which investigated the incident. The company will also have to adhere to a “strict compliance plan” and must submit extra documentation to the FCC whenever it hopes to launch more satellites in the future.