Most altcoins are created by people who have a specific idea or application in mind. Altcoins use the same principles as Bitcoin. Altcoins can use blockchain technology in a very different way than Bitcoin.
Some altcoins, like Bitcoin, use encryption to secure transactions and to generate new currency units. Altcoins may follow different rules and protocols than Bitcoin. This could include how mining and transactions are handled.
Forks are the most common. Forks are blockchains that separate and become incompatible with their original chains. Litecoin is one of the forks of Bitcoin. The original code was a copy from the Bitcoin blockchain, but there were some adjustments made to improve transaction speeds and storage efficiency.
Nevertheless, certain altcoins are not forks. These altcoins offer a programming toolkit and language to developers, allowing them to build decentralized blockchain apps. Ethereum, for example, expanded the use and scope of Bitcoin's Blockchain technology beyond just keeping track of transactions. Ethereum's blockchain also stores agreements, in the form "smart contract". These contracts will automatically execute an agreement if certain requirements are met.
Different altcoins will therefore function differently depending on their respective blockchain protocols.